Skip to content

Instantly share code, notes, and snippets.

@pcostarg
Last active January 29, 2017 13:31
Show Gist options
  • Save pcostarg/e64024db95a316a7e8c97ca0cf2d040c to your computer and use it in GitHub Desktop.
Save pcostarg/e64024db95a316a7e8c97ca0cf2d040c to your computer and use it in GitHub Desktop.
Install npm and use it on linux
#SRC: https://www.digitalocean.com/community/tutorials/how-to-use-npm-to-manage-node-js-packages-on-a-linux-server
sudo apt-get update
#or sudo apt-get install node
sudo apt-get install nodejs npm
#You can do that by typing:
npm completion >> ~/.bashrc
#Now, just source the configuration file to re-read the new changes you just added:
source ~/.bashrc
#avoid this: https://github.com/npm/npm/issues/8165
echo prefix = ~/.node >> ~/.npmrc
#might try config check this: https://docs.npmjs.com/getting-started/fixing-npm-permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment