Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@julianduque
Created May 9, 2018 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julianduque/32809ca198a5ec7976ce0138f8ebef40 to your computer and use it in GitHub Desktop.
Save julianduque/32809ca198a5ec7976ce0138f8ebef40 to your computer and use it in GitHub Desktop.
npm audit
...
up to date in 1.85s
[!] 3 vulnerabilities found [2672 packages audited]
    Severity: 2 low | 1 high
    Run `npm audit` for more detail

Ok, let's run npm audit

⬢  power-tools  (v8.11.1) npm audit
npm ERR! code EAUDITNOLOCK
npm ERR! audit Neither npm-shrinkwrap.json nor package-lock.json found: Cannot audit a project without a lockfile
npm ERR! audit Try creating one first with: npm i --package-lock-only

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/julianduque/.npm/_logs/2018-05-09T21_24_41_843Z-debug.log

Oh snap, I don't use package-lock, but will follow this suggestion

⬢  power-tools  (v8.11.1) npm i --package-lock-only
npm WARN npm-example@1.0.0 No description
npm WARN npm-example@1.0.0 No repository field.

npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 706ms
up to date in 2.129s
[!] 3 vulnerabilities found [2672 packages audited]
    Severity: 2 low | 1 high
    Run `npm audit` for more detail

Ok, I should be good, let's do it again

⬢  power-tools  (v8.11.1) npm audit
npm ERR! code EAUDITNOLOCK
npm ERR! audit Neither npm-shrinkwrap.json nor package-lock.json found: Cannot audit a
 project without a lockfile
npm ERR! audit Try creating one first with: npm i --package-lock-only

npm ERR! A complete log of this run can be found in:npm ERR!     /Users/julianduque/.npm/_logs/2018-05-09T21_25_54_711Z-debug.log

nope!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment