-
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 removes invalid references instead of failing with an error starting in 9.6.6
#6742
Comments
9.6.6
9.6.6
9.6.6
9.6.6
9.6.6
This would technically be a breaking change for the end user and therefore not inline with the semantic versioning spec. |
@wraithgar Do you have any insights about this one? From the release diff, it seems that you are the main contributor of this release |
What is the plan here? We just noticed that our github-action dependabot pipelines started failing due to us using a node v20 + npm v10, which doesn't play well with dependabot.
|
@bartelemi your issue seems unrelated to op |
This is not a bug. That error
In this case you asked npm to install a module, which it did. Part of the package install process is writing the new info to the package.json and package-lock. |
Thanks for the clarity @wraithgar , much appreciated. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Starting with npm
9.6.6
if we runnpm install fetch-factory@0.0.2 --package-lock-only
with apackage.json
containing invalid references, it succeeds and removes the invalid references instead of failing with a validation error like previous versionsnpm install
fails as expectedI went over the release notes of 9.6.6 and I could not find any mention about this change in behavior. Was this intentional?
Expected Behavior
In
9.6.5
the same command fails with the errornpm ERR! must provide string spec
Steps To Reproduce
Reproducer : https://github.com/yeikel/npm-invalid-dependency-removed
Logs : https://github.com/yeikel/npm-invalid-dependency-removed/actions/runs/5994585281/job/16256409062
git clone https://github.com/yeikel/npm-invalid-dependency-removed.git
nvm install 18
nvm use 18
9.6.7
npm install fetch-factory@0.0.2 --package-lock-only
Expected : npm should fail with the following error
npm ERR! must provide string spec
Actual :
package.json
Environment
The text was updated successfully, but these errors were encountered: