Reputation: 140
I am using Mintty 2.8.4
as my terminal to install npm packages.
I installed an earlier version of an npm package called moment
and I got warnings about vulnerabilities. One of the suggestions my terminal gave me was to run npm audit
. On running that command my terminal doesn't recognize it. It throws a list of other recognized commands instead.
Can anyone help me with explaining how to run audit
on this terminal?
I have attached a detailed image of the error and the terminal I am using.
Upvotes: 3
Views: 6054
Reputation: 38787
It says exactly what you need to do:
Run
npm i npm@latest -g
to upgrade your npm version, and thennpm audit
to get more info.
Upvotes: 5
Reputation: 38563
npm audit
has just been introduced in npm 6, I see you’re running 5.6.0.
https://docs.npmjs.com/getting-started/running-a-security-audit
They have probably made the security reports available in npm 5 as well, but you need npm 6 to run audit.
Upgrading npm will solve the problem.
Upvotes: 9