Skip to content

Instantly share code, notes, and snippets.

@saleh-old
Last active February 7, 2019 14:56
Show Gist options
  • Save saleh-old/baae07b9c3d38382eeb58d97cefd8d73 to your computer and use it in GitHub Desktop.
Save saleh-old/baae07b9c3d38382eeb58d97cefd8d73 to your computer and use it in GitHub Desktop.
Node useful commands that I keep forgetting
# To see where global packages (and which packages) are installed
npm list -g
# set new path for global packages:
mkdir ~/.global-modules
# add to ~/.npmrc:
npm config set prefix "~/.global-modules"
# then load it in ~/.zshrc:
export PATH=~/.global-modules/bin:$PATH
# nvm set default
nvm alias default vx.y.z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment