Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm audit only for production dependencies?

Currently, when running npm audit in a project, it checks both the dependencies and the devDependencies. I am looking for a way to only check the dependencies. Is there currently a way to do so?

like image 235
user857990 Avatar asked May 15 '18 14:05

user857990


People also ask

What does npm audit production do?

Description. The audit command submits a description of the dependencies configured in your project to your default registry and asks for a report of known vulnerabilities. If any vulnerabilities are found, then the impact and appropriate remediation will be calculated.

Can I ignore npm audit?

You can skip auditing at all by adding the --no-audit flag.


1 Answers

Support for --production flag was released in npm 6.10.0

https://github.com/npm/cli/pull/202

npm audit --production

like image 106
Joe Bowbeer Avatar answered Sep 18 '22 13:09

Joe Bowbeer