-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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] Confusing warning message with "npm install" without "package-lock.json" #3721
Comments
Noticed this happens when
|
I agree that this message could be improved in the cases you've laid out. I believe the line about |
Possibly but a clean repository without If I remove |
It is possible that |
I'm a bit confused here, is there also a |
I was incorrect in my first comment about the message being necessary in these cases. I just checked and both of these cases (no package-lock and package-lock with conflicts) about both successfully install without a warning in |
Ref: npm/cli#3721 Prior to [this change](c7f2370#diff-a22bf0383032b8f318ebe49a4e41b34bcc98e2c10d18322f619edcd041a27483R333-R334) reifying with no package-lock or a package-lock with a merge conflict would result in an old lockfile warning. This adds regression tests to explicitly test both those scenarios.
Ref: npm/cli#3721 Prior to [this change](commit) reifying with no package-lock or a package-lock with a merge conflict would result in an old lockfile warning. This adds regression tests to explicitly test both those scenarios. [commit]: c7f2370#diff-a22bf0383032b8f318ebe49a4e41b34bcc98e2c10d18322f619edcd041a27483R333-R334
Ref: npm/cli#3721 Prior to [this change](commit) reifying with no package-lock or a package-lock with a merge conflict would result in an old lockfile warning. This adds regression tests to explicitly test both those scenarios. [commit]: c7f2370#diff-a22bf0383032b8f318ebe49a4e41b34bcc98e2c10d18322f619edcd041a27483R333-R334
Ref: npm/cli#3721 Prior to this change[^1] reifying with no package-lock or a package-lock with a merge conflict would result in an old lockfile warning. This adds regression tests to explicitly test both those scenarios. [^1]: c7f2370#diff-a22bf0383032b8f318ebe49a4e41b34bcc98e2c10d18322f619edcd041a27483R333-R334
I read as much as I could find for this message "The package-lock.json file was created with an old version of npm" but not even this issue description here is a complete it. I get this message EVERY TIME on "npm update". I get it when node_modules and package-lock.json exist. I get it when I remove (rm -rf) I don't have a merge conflict either. I get it after following advice I found e.g. on StackOverflow for people asking about this exact message "The package-lock.json file was created with an old version of npm", their advice did not help. it only happens for I'm posting this comment just FYI, I hope this is taken care of with the patch associated with this issue(?). PS: Oh and it says "This is a one-time fix-up, please be patient..." but it repeats every. single. time. (for npm update) npm version is 8.1.1 My package.json has
Instead of the npm registry, could that have something to do with it? EDIT: Just removed all lines with references to Github in package.json and no change.
*EDIT: Log shown up to the point after the message is displayed. Nothing unusual from there.
My project-local |
Ref: npm/cli#3721 Prior to this change[^1] reifying with no package-lock or a package-lock with a merge conflict would result in an old lockfile warning. This adds regression tests to explicitly test both those scenarios. [^1]: c7f2370#diff-a22bf0383032b8f318ebe49a4e41b34bcc98e2c10d18322f619edcd041a27483R333-R334 PR-URL: #341 Credit: @lukekarrys Close: #341 Reviewed-by: @isaacs
Is there an existing issue for this?
Current Behavior
After removing
package-lock.json
and runningnpm install
the following warning pops up:Expected Behavior
I find the warning a bit confusing in this case as there is no old file.
Removing
node_modules
as well aspackage-lock.json
produces no warning.Steps To Reproduce
npm init
npm install --save-dev eslint
(any package really)rm package-lock.json
npm install
Environment
The text was updated successfully, but these errors were encountered: