Skip to content

Instantly share code, notes, and snippets.

@evanhutomo
Last active August 29, 2015 14:17
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 evanhutomo/11c6d62033d4a31ecd1f to your computer and use it in GitHub Desktop.
Save evanhutomo/11c6d62033d4a31ecd1f to your computer and use it in GitHub Desktop.
npm useful command (for reminder purpose)
#print list of global installed libraries
npm list -g
#write .bash_profile with NODE_PATH (npm root -g) -> point to node_modules
echo 'export NODE_PATH="'$(npm root -g)'"' >> ~/.bash_profile && . ~/.bash_profile
#write .bash_profile with NODE_PATH GLOBAL
echo 'export NODE_PATH="'$(npm bin -g)'"' >> ~/.bash_profile && . ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment