npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Incremental `npm ci`

Currently npm ci deletes node_modules/ . It would be great if it supports incremental update.

To understand the idea, if you want incremental updates, why would you use npm ci rather than npm install?

The current intended usage is:

any situation where you want to make sure you’re doing a clean install of your dependencies

Here is one example usage:

  1. User is working on a shared project.
  2. User just pulled the latest changes from “master” branch, which includes the npm lock file.
  3. User wants to make sure the dependencies are up to date so runs npm ci.

To my understanding, even if there is no change or only one package change, it will install everything from scratch currently.

We’re using yarn currently and was debating if we can switch back, and this was the only major difference for our workflow. yarn install --frozen-lockfile does incremental updates. Also mentioned from another comment here