[BUG] NPM doesn't complain about malformed JSON in package-lock file #4844
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
The artifacts of a merge conflict (
<<<< HEAD
,||||
,====
,>>>>> <hash>
) in apackage-lock.json
file were accidentally committed to my repository. Runningnpm ci
succeeded with no issues, even though theversion
andintegrity
fields were duplicated in a JSON object, and non-JSON compliant text was present.Expected Behavior
If the JSON in a
package-lock.json
file is malformed, I expectnpm ci
to exit with a non-zero exit code. That is the behavior of NPM v6.14.16, but not NPM v7 or v8.Steps To Reproduce
package.json
andpackage-lock.json
to reproduce the bug).7.0.0
.npm ci
.7.0.0
, like6.14.16
, runningnpm ci
does throw an error.Environment
The text was updated successfully, but these errors were encountered: