I’ve been trying to change default Node.js version from 6.11.1 to 8.1.4. from the console.
I typed:
nvm alias default 8.1.4
But I received the message:
tee: /home/nvm/.nvm/alias/default: Permission denied
Then, I tried to sudo:
sudo
But the console said:
bash: sudo: command not found
How can I do to change default Node.js version??
Tim
2
You can change that in your package.json file. The entry looks like this:
"engines": {
"node": "6.9.1"
},
1 Like
"engines": {
"node": "6.9.1"
},
Hmm, it looks like a “runtime” change…
Cannot I change the version with any nvm commands?
Gareth
4
It’s not a runtime change, the engines configuration is applied at installation time.
It’s not a runtime change, the engines configuration is applied at installation time.
finally, I got it. I’ve forgotten that package.json is npm’s configuration file.
Thank you for your kindness!