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 invalid config warning duplicates lock file version #6404

Closed
2 tasks done
broksonic21 opened this issue Apr 27, 2023 · 1 comment · Fixed by #6443
Closed
2 tasks done

[BUG] npm invalid config warning duplicates lock file version #6404

broksonic21 opened this issue Apr 27, 2023 · 1 comment · Fixed by #6443
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 9.x work is associated with a specific npm 9 release

Comments

@broksonic21
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

If you have lockfile-version=5 by mistake (or anything other than missing, 1, 2 or 3) in the .npmrc, npm warnings/errors show a non-uniq list of error cases - null, 1, 2, 3, 1, 2, 3

npm WARN invalid config lockfile-version="5" set in /Users/REDACTED/REDACTED/REDACTED-website/.npmrc
npm WARN invalid config Must be one of: null, 1, 2, 3, 1, 2, 3
npm ERR! Invalid lockfileVersion config: 5

Expected Behavior

Should uniq, and return just null, 1, 2, 3

npm WARN invalid config lockfile-version="5" set in /Users/REDACTED/REDACTED/REDACTED-website/.npmrc
npm WARN invalid config Must be one of: null, 1, 2, 3
npm ERR! Invalid lockfileVersion config: 5

Steps To Reproduce

With npm 9.6.5

have a package.json and an .npmrc
in the .npmrc, have this

lockfile-version=5

run npm install

Get the warning

Environment

  • npm: 9.6.5
  • Node.js: v18.16.0
  • OS Name: Mac
@broksonic21 broksonic21 added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels Apr 27, 2023
@wraithgar wraithgar added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Apr 28, 2023
@kashyapkaki
Copy link
Contributor

Hi @wraithgar, have raised PR for the above issue.

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 2 secondary priority issue Release 9.x work is associated with a specific npm 9 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants