Skip to content

[BUG] npm install --save-exact doesn't work in 7.7.0 #2932

Closed
@jameschensmith

Description

@jameschensmith

Current Behavior:

npm install --save-exact <package> adds save-prefix to package.json in v7.7.0.

I have tracked it down to the removal of lib/utils/flat-options.js (lines 166-167 in particular are important to this issue). I believe this file was removed and is intended to be replaced with the unified config library. This conditional setting of savePrefix needs to be handled still.

Expected Behavior:

npm should save the exact version. No prefix should be added to package.json.

Steps To Reproduce:

  1. npm i -g [email protected]
  2. npm init -y
  3. npm install --save-exact [email protected]
  4. Note in package.json that typescript is ^4.2.3

Environment:

  • OS: Manjaro 21.0
  • Node: 10.24.0
  • npm: 7.7.0

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 0will get attention right awayRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions