Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM configuration to skip vulnerabilities audit for devDependencies on install

Tags:

node.js

npm

audit

Is it possible to configure npm to skip audit of vulnerabilities for devDependencies when running command npm install?

like image 256
revy Avatar asked Sep 05 '25 02:09

revy


2 Answers

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

npm install --no-audit

If you want this to apply to devDependencies only, you can run it this way:

npm install --no-audit --only=dev

If you want this to apply to production dependencies only, you can run it this way:

npm install --no-audit --only=prod
like image 110
Nour Edin Al-Habal Avatar answered Sep 09 '25 19:09

Nour Edin Al-Habal


Since this is a first result when you try to google for a way to disable audit, let's post a more convenient solution for more general case.

You can skip auditing altogether by using npm config:

npm config set audit false

And to reduce pesky noise even more:

npm config set fund false
like image 42
garkin Avatar answered Sep 09 '25 19:09

garkin