cli
cli copied to clipboard
[BUG] NPM audit breakes packages versions
Is there an existing issue for this?
- [x] I have searched the existing issues
This issue exists in the latest npm version
- [x] I am using the latest npm
Current Behavior
When I had done npm audit fix after installing package with all dependencies, npm has changed the version of the package from the latest one to ^0.0.0 with breaks the application, preventing it from working.
Expected Behavior
Normal fix of audit and upgrading the version of packages to latest verstion instead of downgrading them
Steps To Reproduce
Given on example of the package react-scripts:
- Install the
react-scripts@latest - check the contest of
packages.jsonfor the version of the installed version of the package - Run 'npm audit fix --force`
- See the output in the terminal, as well the changes to the
packages.jsonto :^0.0.0"
Environment
-
npm: 9.2.0
-
Node.js: v20.19.2
-
OS Name: Debian (codename: trixie)
-
npm config:
; copy and paste output from `npm config ls` here
location = "project"
; node bin location = /usr/bin/node ; node version = v20.19.2 ; npm local prefix = [trunchated] ; npm version = 9.2.0 ; cwd =[trunchated] ; HOME = [trunchated]