I used "axios": "^0.19.2"
, running npm i
gave the warning "npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1." so I run npm update -S axios
to update it. But it failed to update axios. I run yarn upgrade axios
but it failed too.
I had thought there maybe a module required 0.19.2
so I checked package-lock.json
and I found the only module in my project that requires axios is pm2
but it requires "axios": "^0.21.0"
,
"@pm2/js-api": {
"version": "0.6.7",
"resolved": "https://registry.npmjs.org/@pm2/js-api/-/js-api-0.6.7.tgz",
"integrity": "sha512-xxxxxxxx",
"requires": {
"async": "^2.6.3",
"axios": "^0.21.0",
"debug": "~4.3.1",
"eventemitter2": "^6.3.1",
"ws": "^7.0.0"
},
I have no idea why npm update failed to update axios. I then run npm uninstall axios
, npm install -S axios
then "axios": "^0.27.2"
is installed.
But why ?
--- update ---
To verify whether I can reproduce this issue or not I create a project at https://github.com/qiulang/npm-update-error-demo
It shows that even I only have one dependency axios
, npm update axios
still failed to update. BTW I use npm 8.x (try both 8.5 & latest 8.11)