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

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

Closed
jameschensmith opened this issue Mar 24, 2021 · 2 comments · Fixed by #2937
Closed

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

jameschensmith opened this issue Mar 24, 2021 · 2 comments · Fixed by #2937
Assignees
Labels
Bug thing that needs fixing Priority 0 will get attention right away Release 7.x work is associated with a specific npm 7 release

Comments

@jameschensmith
Copy link
Contributor

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 npm@7.7.0
  2. npm init -y
  3. npm install --save-exact typescript@4.2.3
  4. Note in package.json that typescript is ^4.2.3

Environment:

  • OS: Manjaro 21.0
  • Node: 10.24.0
  • npm: 7.7.0
@jameschensmith jameschensmith added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Mar 24, 2021
@ruyadorno ruyadorno added Priority 1 high priority issue and removed Needs Triage needs review for next steps labels Mar 24, 2021
@darcyclarke darcyclarke added Priority 0 will get attention right away and removed Priority 1 high priority issue labels Mar 24, 2021
@wraithgar wraithgar self-assigned this Mar 24, 2021
wraithgar added a commit that referenced this issue Mar 24, 2021
It needs to take save-exact into consideration

Closes: #2932
@ruyadorno
Copy link
Contributor

fixed in npm@7.7.1

@TomaszG
Copy link

TomaszG commented Mar 25, 2021

I'm using npm@7.7.4 and neither --save-exact nor -E doesn't work :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 0 will get attention right away Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants