Last Updated: March 02, 2016
·
251
· dsdenes

Node.js environment and application full update

Supposing that you have an existing node and npm.

myproject/$ sudo npm install n -g
myproject/$ sudo n stable -a
myproject/$ sudo npm install npm -g
myproject/$ sudo npm update -g
myproject/$ sudo npm rebuild -g
myproject/$ sed -i -r 's/"[0-9~^*.]+\.[0-9~^*.]+"/""/g' package.json
myproject/$ rm -rf node_modules/
myproject/$ npm install
myproject/$ npm update --save
myproject/$ npm update --save-dev