I am using nvm to install and manage node versions.
nvm ls tells me that I have only 12.14.1 installed, and
node -v tells me that the version is indeed 12.14.1.
But when I open a node.js file in C9 and hit the Run button, it is using a different version of node (version 10).
When the workspace was set up, node was installed with:
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get update && apt-get install -y nodejs
And sure enough, if I re-run the above but based on version 12 instead, when I use the C9 run button to run code, it does now start using node version 12.
But why the separation between when nvm (and command line) thinks, and what Cloud9 “run” thinks?
How can I tell Cloud9 to use the node version that is in place when doing stuff from the command line?