Sunday, April 10, 2016

software installation - How to install the latest versions of NodeJS and NPM?



I noticed over at the https://nodejs.org/ website that node is currently at v 0.12.0.



Can someone let me know how to install the latest version of node together with npm (terminal commands please)?



Fresh installation




Use the NodeSource PPA. For details look at the installation instructions. First, choose the Node.js version you need and add the sources for it:



v=8   # set to 4, 5, 6, ... as needed
curl -sL https://deb.nodesource.com/setup_$v.x | sudo -E bash -


Then install the Node.js package.



sudo apt-get install -y nodejs



P.S.: curl package must be installed on server for these code lines.



Upgrading



If you have nodejs already installed and want to update, then first remove current instalation and install it again using scripts above.



sudo apt-get purge nodejs npm


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...