Node version not persisting


So I created a workspace where I’ve updated the version node and npm, I’ve installed the angular cli, generated some code… ran stuff, cool.

Shut down the workspace come back today, start it back it back up… old node, no angular cli.
Why isn’t my vm persisting my changes between use?


did you install new node with nvm? If yes did you make the new version the default?
Try running nvm ls to see all installed node versions and then nvm use <versionnumber> to activate the version you want.


good call. Exactly the problem I was having. Thanks for the help.


You can use the command nvm alias default 6.10.2 (replace 6.10.2 with whatever version you want, or just 6 to use the latest 6.X.X version) to make a specific version your default and then it will stay default even if your workspace restarts or hibernates + restores.

Keep environment setup

To fully update node and npm and have them persist across reboots in one command…

nvm install node && nvm alias default node && npm update npm -g


you need to use explicit version like nvm alias default 7, nvm alias default node won’t work


I know this is an old question, but I’m still having the problem of the new node version not persisting. I’m trying to use 10.5.0 as my default because it works on another project and the older version won’t recognize async function. I tried the command above. Here is the log:

improviser14:~/workspace (master) nvm ls -> v6.11.2 v8.11.4 v10.5.0 v10.9.0 v10.10.0 system default -> 10.5.0 (-> v10.5.0) node -> stable (-> v10.10.0) (default) stable -> 10.10 (-> v10.10.0) (default) iojs -> N/A (default) improviser14:~/workspace (master) nvm alias default 10.5.0
default -> 10.5.0 (-> v10.5.0)
improviser14:~/workspace (master) node -v v6.11.2 improviser14:~/workspace (master)