You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some modules bind to C++ code, and need to build their binary for the current system on install. Re-running npm install helpfully doesn't force a rebuild of these binaries, but npm ci will rebuild those binaries. This is likely due to blowing away the node_modules directory.
For example, with node-rdkafka, running npm ci in one of our services takes a full 1m15s at best (on macs, it's quite a bit slower). The vast majority of that time is spend configuring, building and linking its native dependencies. I'd like to see a system- or user-level cache (maybe opt-in) that caches named files, all .so objects, all new files created during the install hook, or files identified by some other mechanism.
When
I use npm ci to re-install the module tree to match the new tree.
Where
n/a
How
Current Behavior
npm ci removes everything in node_modules and deletes build artifacts.
Expected Behavior
npm ci caches build artifacts by some identification strategy and copies them instead of running the build script (or maybe just copies them to let the build script detect their presence)
npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.
If your bug is preproducible on v7, please re-file this issue using our new issue template.
If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo
What / Why
Some modules bind to C++ code, and need to build their binary for the current system on install. Re-running
npm install
helpfully doesn't force a rebuild of these binaries, butnpm ci
will rebuild those binaries. This is likely due to blowing away thenode_modules
directory.For example, with
node-rdkafka
, runningnpm ci
in one of our services takes a full 1m15s at best (on macs, it's quite a bit slower). The vast majority of that time is spend configuring, building and linking its native dependencies. I'd like to see a system- or user-level cache (maybe opt-in) that caches named files, all.so
objects, all new files created during theinstall
hook, or files identified by some other mechanism.When
npm ci
to re-install the module tree to match the new tree.Where
How
Current Behavior
npm ci
removes everything innode_modules
and deletes build artifacts.Expected Behavior
npm ci
caches build artifacts by some identification strategy and copies them instead of running the build script (or maybe just copies them to let the build script detect their presence)Who
References
The text was updated successfully, but these errors were encountered: