Last active
March 20, 2017 13:06
-
-
Save Danilo-Araujo-Silva/ec744b0a665f77df303758286821f612 to your computer and use it in GitHub Desktop.
Install Latest NPM and NodeJS and Update All Global NPM packages
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
# Official documentation: https://nodejs.org/en/download/package-manager/ | |
# First install npm using the link above (if you don't have it yet). Then: | |
# sudo is needed for some OSes, if it is not required on yours then you can remove it from the commands. | |
sudo npm install npm@latest -g | |
#Important! The option -f is used to force clean the npm cache. Take care about it. Anyway, I usually do this when I would like to install the latest NodeJS. | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n stable | |
sudo npm update -g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment