npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

specify npm install flags in package.json

What I Wanted to Do

I want to use the library better-sqlite3 which allows you to specify a custom sqlite source at install time. It looks like so:

npm install --sqlite=/path/to/sqlite-src

this flag doesnt ever change so I wanted to know if it was possible to specify flags to npm install in the package.json somewhere. It gets tedious when multiple people on a team are using the library and have to remember to add the flag when setting up the repo.

What Happened Instead

I have to specify the flag to npm install.

Reproduction Steps

if it is necessary to reproduce what I am talking about here (or just understand what I am doing), these are the docs


Platform Info

$ npm --versions
{ npm: '6.9.0',
  ares: '1.15.0',
  cldr: '34.0',
  http_parser: '2.8.0',
  icu: '63.1',
  modules: '67',
  napi: '3',
  nghttp2: '1.34.0',
  node: '11.2.0',
  openssl: '1.1.0i',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '',
  zlib: '1.2.11' }

$ node -p process.platform

I have not worked through reproduce steps, but there are lots of configuration possibilities: