When I create a workspace using the Node template, it gets created with versions of Node and NPM that are I’m guessing years old and no longer even work for many applications. Not sure what possible excuse you could have for setting up users with Node v0.10.35 when the latest stable version is v5.0.0…maybe you don’t think this important? Well, it is. Frankly you’d be better off removing the template feature if you’re not going to maintain it, that would be a better option than having to chase down arcane error messages only to find out it’s due to outdated software. Cloud9 is not a cheap service at my plan level and I expect reasonable maintenance to be done on features I’m paying for.
As an fyi, node 0.10 is not “years old” - up until a few months ago, node 0.12 was the latest version, and there is a ton of software out there which does not even work with node 0.12.
Thanks for mentioning this. Indeed you can use
nvm to manage your node versions. We do regularly update the base images to be sure you are not dealing with ancient software
We still keep the workspaces on 0.10 because it is the most widely compatible version, and we want to ensure our platform is accessible to as many users as possible. Once more packages and applications support 0.12 or later releases we’ll be upgrading the NodeJS version.
As Nikolai mentioned you can change the Node version in your workspace to 5.0 with
nvm install 5 && nvm use 5, or upgrade it manually. You have a full Ubuntu VM so you can tweak it as you wish.
From the bash command line in a node workspace, should I be able to update the node version?
Node does not appear to update. After installing
username:~/workspace (master) $ nvm install 4.2.3 v4.2.3 is already installed. Now using node v4.2.3 (npm v1.4.3) nvm is not compatible with the npm config "prefix" option: currently set to "/nix/store/a5ibcbcsm473kdr75kj4gpsr28ndnknp-nodejs-0.10.26" Run `npm config delete prefix` or `nvm use --delete-prefix v4.2.3` to unset it. username:~/workspace (master) $ node -v v0.10.28 username:~/workspace (master) $ nvm use 4.2.3 Now using node v4.2.3 (npm v1.4.3) nvm is not compatible with the npm config "prefix" option: currently set to "/nix/store/a5ibcbcsm473kdr75kj4gpsr28ndnknp-nodejs-0.10.26" Run `npm config delete prefix` or `nvm use --delete-prefix v4.2.3` to unset it. username:~/workspace (master) $ node -v v0.10.28 username:~/workspace (master) $ which node /mnt/shared/sbin/node
I am not able to change the npm config prefix which breaks running any other version of node with nvm. It appears I’m stuck using node 0.10.28 which we cannot use for our projects.
We recently open-sourced the
Dockerfile for each workspace type, and you are invited to submit pull requests to improve the containers that run on Cloud9.
I saw that c9 open sourced it. That’s awesome.
Although I’m not sure how changes to the node template will help here as it appears the security and permissions of the node workspace are set in the base docker image. I guess I can try updating node and npm config in the dockerfile but I have no idea if that will break c9 IDE or not.
I don’t know too much about how the c9 IDE app itself, but it appears to be a conflict running node workspaces because c9 IDE uses node itself. Do we need more separation b/w the node version c9 IDE uses and what the workspace uses?