Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Cache build artifacts for npm ci #808

Closed
skeggse opened this issue Feb 13, 2020 · 1 comment
Closed

[FEATURE] Cache build artifacts for npm ci #808

skeggse opened this issue Feb 13, 2020 · 1 comment
Labels
Enhancement new feature or improvement

Comments

@skeggse
Copy link

skeggse commented Feb 13, 2020

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, 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)

Who

  • n/a

References

@darcyclarke darcyclarke added the Enhancement new feature or improvement label Oct 30, 2020
@darcyclarke
Copy link
Contributor

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

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement new feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants
@darcyclarke @skeggse and others