Start working with sage 9

This is probably a silly question, so my apologies in advance: I want to move on to Sage9, but I realise node.js >=6.9.x should be installed. Running npm -v, apparently current version on my system (Ubuntu) is 3.7.3…
What would be the safest way to update node to its latest version without risking my current projects? Could this update break my current projects? How do I avoid this risk? All my projects are on the same /www directory on one server, and this is a given configuration that I currently cannot change.
Thanks!

You should be able to use nvm or n to manage Node versions pretty easily on a pretty granular scale.

1 Like

Thanks! I was hoping there’s a way of doing that.
To be more specific: what command(s) should I use in order to upgrade node everywhere but my existing projects?
Thanks again!

You would typically upgrade Node globally on your workstation, rather than per-project. Updating it once, globally, should be enough.

Thanks! So if I get it right: if I go ahead and update node globally, it should not affect my existing projects and the version of node they are currently running on?

You’ll want to use one of the above libraries to manage node. I use nvm.

THEN you can update and install versions of node with nvm, such as $ nvm install 6 and then $ nvm use 6 every time you’re in that project. In older projects, where you might use older versions, you’d do $ nvm use {version}

Without one of these version managers, you might have to re-build or something like that. Usually the only thing that breaks is node sass, which I usually can fix by doing npm rebuild node-sass.

Let us know how it goes.

1 Like

Thanks! So next step is to consult with google about best tutorial or reference on NVM done right… If you have any recommendation on a good tutorial about this - it will be mostly appreciated. And thanks again for your advise! :slight_smile: