Skip to content

Instantly share code, notes, and snippets.

@matiascarranza
Last active January 20, 2017 18:02
Show Gist options
  • Save matiascarranza/57440271ffb97502d69eff5d937610dc to your computer and use it in GitHub Desktop.
Save matiascarranza/57440271ffb97502d69eff5d937610dc to your computer and use it in GitHub Desktop.
npm Tips and Tricks
  • Getting Help!
npm help
npm help <command>
  • npm Command Autocomplete
npm completion >> ~/.zshrc
  • Fixing Global Module Permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH="$HOME/.npm-global/bin:$PATH"
npm install -g npm
  • Managing Your Packages
npm list
npm list --depth=0
npm home <package>
npm prune
  • Finding Outdated Modules
npm outdated
npm view <package> versions
  • Using Development Packages
npm link
npm list -g --depth=0

source https://www.sitepoint.com/10-npm-tips-and-tricks/

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