Reputation: 1960
I have installed Cloud9 IDE with node v0.6.19. The default node installed is v0.11.5.
When I start a simple script with Cloud9 (with node v0.6.19) it uses the version of node I started Cloud9 IDE (v0.6.19).
console.log('Version: ' + process.version);
logs v0.6.19
Is there a way I can use different version of node? I want to use v0.11.5 for my application and v0.6.19 for Cloud9 IDE.
Upvotes: 1
Views: 2320
Reputation: 3133
I'm using the Cloud9 IDE on https://c9.io/. I too wanted to change the version of Node and found this page, but none of the instructions helped. I'm posting my solution for future Googler's.
Cloud9 has the nvm
node version manager pre-installed. These are the steps I used to change the version of Node that runs when you click "Run" for a file.
$ mkdir /home/ubuntu/.nvm/versions
$ nvm install 0.12.0
$ nvm alias default 0.12.0
Why the mkdir? Probably because the nvm support is "rudimentary". Anyway, that's what worked for me.
You can confirm this by adding this to your server.js
file:
console.log("Node Version: " + process.version)
Hope this helps somebody.
Upvotes: 1
Reputation: 387
The trick seems to be to edit /cloud9/configs/default.js
and specify
{
packagePath: "./cloud9.run.node", // or "./cloud9.run.node-debug"
listenHint: "Important: in your scripts, use 'process.env.PORT' as port and '0.0.0.0' as host.",
// **** ADD THIS: ****
nodeVersions: {
"0.10": "/root/.nvm/v0.10.21/bin/node"
// and so on...
}
},
for the plugins cloud9.run.node
and cloud9.run.node-debug
.
Upvotes: 0
Reputation: 24084
Open tun panel (running figure near setting button) and pick required version from the dropdown.
Upvotes: 0
Reputation: 1768
I'm running Cloud9 IDE latest master branch (fbedf05b23
) with Node.js v0.10.17.
You need libxml2 installed. I'm using Mac OSX.
brew update
brew install --universal libxml2
brew upgrade node
git clone https://github.com/ajaxorg/cloud9.git
cd cloud9
npm install
npm install jsDAV
sudo bin/cloud9.sh -w ~/path/to/workspace --username xxx --password xxx
Upvotes: 0