The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
npm ci doesn't install deep git dependencies correctly
What I Wanted to Do
My build pipeline installed a project having multiple git dependencies using
npm ci. I expected all dependencies to be installed correctly.
What Happened Instead
The git package is not installed correctly. In node_modules I only find three files:
README.md. I expected
package-lock.json and other files.
npm i, the deep git dependency is installed correctly though.
npm ci and
npm i to install a project having an npm dependency with a git dependency
The dependency has a git dependency, which is the one missing partly from node_modules
$ npm --versions npm: '6.11.3', ares: '1.15.0', brotli: '1.0.7', cldr: '35.1', http_parser: '2.8.0', icu: '64.2', modules: '64', napi: '5', nghttp2: '1.39.2', node: '10.17.0', openssl: '1.1.1d', tz: '2019a', unicode: '12.1', uv: '1.28.0', v8: '6.8.275.32-node.54', zlib: '1.2.11' $ node -p process.platform linux
I’ve been seeing what I think is the same problem.
It looks like the
prepare step is only run in “dev” mode: https://github.com/npm/cli/blob/latest/lib/install.js#L626-L629
I believe I’ve been able to reproduce this install failure but now it’s not doing it. It’s unclear to me if something has changed.
You mean not run when NODE_ENV=production ? how is
this.dev defined ?
How am I supposed to use the prepare script when using npm ci ?
Seems it was not fixed