-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When the package.json was updated with new dependencies, and the lockfile isn't, npm ci successfully installs the dependencies.
Expected Behavior
According to the documentation npm ci should exit when there's a discrepancy between the package.json and the lockfile.
If dependencies in the package lock do not match those in package.json, npm ci will exit with an error, instead of updating the package lock.
https://docs.npmjs.com/cli/v7/commands/npm-ci
Steps To Reproduce
- Create an empty directory
- Initialize npm;
npm init -f && npm install - Add a dependency to the
package.json, but don't update thepackage-lock.json;npm install --save --no-package-lock leftpad - Run
npm ci - See: There's no error.
Environment
- OS: macOS
- Node: 14.16.0
- npm: 8.1.1
johndiiorio, alon-sage and zfeed
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release