Update node.js version inside Cloud 9 IDE

Davide Icardi picture Davide Icardi · Jun 4, 2015 · Viewed 10.7k times · Source

My Cloud 9 workspace is running with Node.Js 0.10. How can I update it to the latest version of Node.Js (today is 0.12.4)?

I'm trying to install Node.Js using apt-get but I will always get 0.10 version.

UPDATE: Latest version of Cloud 9 workspaces now have preinstalled version 4.1.1

Answer

Davide Icardi picture Davide Icardi · Jun 4, 2015

With Cloud 9 you can use NVM to install a new version of Node.js. Just run:

nvm install 5.5.0
nvm use 5.5.0
nvm alias default v5.5.0

NVM keeps all the versions so you can switch back whenever you want.

See also https://docs.c9.io/v1.0/docs/writing-a-nodejs-app.