Last active
January 29, 2017 13:31
-
-
Save pcostarg/e64024db95a316a7e8c97ca0cf2d040c to your computer and use it in GitHub Desktop.
Install npm and use it on linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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