Question – How can I update Node.js and npm for future versions?
I just installed Node.js and npm (for additional modules).
How can I update Node.js and the modules I am using to the latest versions
NPM can do it? or do I have to remove and reinstall Node.js and npm to get the next versions?
I followed https://github.com/nodejs/node/wiki/Installation and the next section npm.
Found this really accurate way to update the node on another user blog, you can do it by installing
sudo npm cache clean -f sudo npm install -g n sudo n stable
Install the current stable version of the.
node Anyway, I recommend using.
Also if you want to upgrade to a particular version, follow this:
sudo npm cache clean -f sudo npm install -g n sudo n <specific version>