Open VTrngNghia opened 2 years ago
I have this problem as well. Is there a workaround?
I also have this issue.
Would be nice to have ability to set --legacy-peer-deps flag for npm audit fix --package-lock-only
.
We should be able to fix audit issue only related to package-lock.
If I run npm audit fix --package-lock-only --force
it seems to ignore --package-lock-only and updates both package.json and package-lock.json and introduces breaking changes.
Hi @VTrngNghia ,
Could you please provide actual steps and a package.json
sample
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
As per
npm-audit
documentations, I'd expect flag--legacy-peer-deps
to work withnpm audit fix
. It does not.Expected Behavior
Flag
--legacy-peer-deps
should work withnpm audit fix
Steps To Reproduce
I ran
npm audit fix
and encountered this errorI ran again with
npm audit fix --legacy-peer-deps
to no effect. The error was exactly the same.Environment
@fortawesome:registry = "https://npm.fontawesome.com/" //npm.fontawesome.com/:_authToken = (protected) registry = "https://registry.npmjs.org/"
; node bin location = /Users/nghiavt/.nvm/versions/node/v16.15.0/bin/node ; node version = v16.15.0 ; npm local prefix = /Users/nghiavt/Projects/(protected) ; npm version = 8.11.0 ; cwd = /Users/nghiavt/Projects/(protected) ; HOME = /Users/nghiavt ; Run
npm config ls -l
to show all defaults.```