-
-
Save dominhhai/a767b55e460125ea9c267f74d3868ea1 to your computer and use it in GitHub Desktop.
Update node & npm bash
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
#! /bin/bash | |
# node update | |
echo 'update node.js...' | |
echo 'current node version:' | |
node -v | |
echo 'clean npm cache...' | |
sudo npm cache clean -f | |
echo 'update n...' | |
sudo npm install -g n | |
echo 'update node...' | |
sudo n stable | |
echo 'updated node. Current version is:' | |
node -v | |
# npm update | |
echo 'update npm...' | |
echo 'current npm version:' | |
npm -v | |
sudo npm install -g npm | |
echo 'updated npm. Current version is:' | |
npm -v |
Author
dominhhai
commented
Apr 23, 2016
•
- add permission:
- do update
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment