-
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] npm install --package-lock-only
does not imply --package-lock
#2747
Comments
cc @wraithgar @darcyclarke; can this be triaged? |
Asking to install from the package-lock-only when you have disabled the package-lock seems like a paradox. The description for
The description for
When we try this we get this warning on the cli
Which is also technically incorrect. I don't know what the right behavior is here but I feel like we should explicitly bail here when being asked to resolve a logical paradox. Looking through the original issue it seems this was all fixing a symptom, not a problem, and that was that |
Even if we want to resolve the two requests, the |
@wraithgar the right behavior is what npm 6 eventually did - package-lock-only implies package-lock. This was an unintentional breaking change in v7. Even if npm audit worked (as it should always have) without a lockfile, I’d still have this use case - all my packages have the lockfile disabled, and i use package-lock-only to generate a “before” and “after” lockfile to triage bugs caused by dependency updates. |
Having this issue as well using node 15.14.0/npm 7.7.6. I've got
in my (global)
or should that aspect be its own issue? |
Current Behavior:
put
package-lock=false
in.npmrc
.Run
npm install --package-lock-only
.Expected Behavior:
a package-lock.json is generated.
Steps To Reproduce:
See above.
Environment:
This is a regression from #146 / v6.9.0.
(possibly related to #2358)
The text was updated successfully, but these errors were encountered: