Reputation: 1493
When I run the npm audit
task in Powershell I get a prompt asking "Did you mean this? Edit"
I am running in the root directory of my project (with the package.json file) and other npm commands work as expected.
It appears that the command is not recognised. From what I can see in the documentation: https://docs.npmjs.com/cli/audit this should work out of the box without any other packages.
Upvotes: 2
Views: 951
Reputation: 6994
The npm audit
command was added in npm v6. [1]
Node.js v10.3.0 was the first Node version to bundle npm v6 with it. Upgrading to Node v10.3.0 or later will get you npm v6 and npm audit
support.
You can also upgrade your npm version independently of your Node.js version by running npm install -g npm
. [2]
Upvotes: 3