I create an empty NodeJS project very minimal to investigate high vulnerability message i get when I run npm i to build dependencies.
here is the basic package.json.
{
"name": "test",
"version": "1.0.0",
"main": "test.js",
"type": "module",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.18.2"
},
"description": ""
}
When i run npm i on this project, i get following message:
up to date, audited 65 packages in 532ms
12 packages are looking for funding
runnpm fund
for details2 high severity vulnerabilities*
To address all issues (including breaking changes), run:
npm audit fix –forceRun
npm audit
for details.
Obviously, i run npm audit fix –force and it can’t fix it, it tries to downgrade Express to 3.21 but bring even more vulnerabilities.
Info: i have been working with NodeJS and Express for the last year and i have other NodeJS projects working fine with Express 4.18.2.
Any idea why it is now broken and npm not able to build with Express 4.18.2. I tried 4.19.2 and I am getting same issue.
Any feedback appreciated.
tried
npm audit fix --force
as suggested but 2 high vulnerability thrown.
Well, for some reasons, tried today and got different results:
*> up to date, audited 65 packages in 338ms
12 packages are looking for funding run
npm fund
for details2 high severity vulnerabilities
To address all issues, run: npm audit fix
Run
npm audit
for details.*
npm audit fix
resolved the vulnerability issue:
% npm audit fix
added 5 packages, removed 1 package, changed 5 packages, and audited 69 packages in 985ms
14 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Yesterday both “npm audit fix” and “npm audit fix –force” couldn’t resolve the vulnerability issue.
Still not understanding what went wrong with npm… anyway issue is resolved.
Thx