npm-audit-ci icon indicating copy to clipboard operation
npm-audit-ci copied to clipboard

exec error: Error: Command failed: npm audit --json

Open cloudlena opened this issue 5 years ago • 4 comments

I'm getting the following error:

$ npm-audit-ci
exec error: Error: Command failed: npm audit --json

I'm running Node.js v12.12.0 on macOs 10.15.1 with npm 6.12.1.

cloudlena avatar Oct 30 '19 20:10 cloudlena

@mastertinner I tried to reproduce this issue and seems like it works fine for me. Do you have any extra details which I can use to reproduce this?

revathskumar avatar Nov 06 '19 05:11 revathskumar

I'm getting the error in this project of mine: https://github.com/mastertinner/shuttrstockr You're right, I just tried it in another project and there it worked fine. However, the repo where it doesn't work should be a pretty standard npm project where the normal npm audit command works fine so I'm not sure why it doesn't work there...

cloudlena avatar Nov 06 '19 07:11 cloudlena

I got the same error, but I also have good news: with the newer versions of npm it is not anymore necessary to use this package, just use npm audit --audit-level=moderate

phaberest avatar Dec 12 '19 10:12 phaberest

Update : The bug seems to appear when the global audit-level is higher than the one passed to npm-audit-ci

Way to reproduce :

npm config set audit-level low
npm-audit-ci -h

KevinBulme avatar Feb 26 '20 07:02 KevinBulme