Skip to content

Instantly share code, notes, and snippets.

@scabbiaza
Last active October 26, 2017 12:30
Show Gist options
  • Save scabbiaza/b7114f9bccc3fedd2fd5 to your computer and use it in GitHub Desktop.
Save scabbiaza/b7114f9bccc3fedd2fd5 to your computer and use it in GitHub Desktop.
NPM sketches

Install / Update node modules

npm install 

List of installed modules

npm list
npm list -g
npm list --depth=0

Node.js version

node -v

Update npm to the latest version sudo npm install npm -g

Update Node.js to the latest version sudo n stable

Log

npm --loglevel < option > install
options:
  silent
  win: Just the “npm ok” or “npm not ok” message at the end.
  error: When something unexpected and bad happens.
  warn: When something odd or potentially dangerous is happening.
  info: Helpful information so you can track what’s happening.
  verbose: Even more.
  silly: Dump everything. Whole objects, you name it, whatever.

Check outdated lib

npm outdated 
npm outdated -g

Clean cache

npm cache clean --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment