I would like to update my node version to latest version possible on my local machine. I am using Ubuntu 16.04. I am currently finding trouble to update with methods available to my best of knowledge. Please note that heroku-cli
is up to date(as of yet).
$ check-node-version
node: 8.3.0
npm: 5.4.2
yarn: 1.2.1
Here are other important commands which may help
harman@manchanda: 04:14 pm ~ $ node -v
v8.3.0
harman@manchanda: 04:14 pm ~ $ which node
/usr/local/heroku/bin/node
harman@manchanda: 04:15 pm ~ $ nodejs -v
v8.7.0
harman@manchanda: 04:15 pm ~ $ which nodejs
/usr/bin/nodejs
harman@manchanda: 04:15 pm ~ $ heroku -v
heroku-cli/6.14.34-1fcf80e (linux-x64) node-v8.6.0
harman@manchanda: 04:15 pm ~ $ n
node/6.2.2
node/6.7.0
node/7.0.0
node/7.8.0
node/7.9.0
node/8.4.0
node/8.7.0
Let me know if any other information is needed for same?
Assuming you have installed n
package on your local machine, you can run
sudo n latest
to update Node to the latest version available (8.7.0 at the moment of writing this answer)
Or, if you want to use the latest Node in your heroku dyno:
package.json
"engines": { "node": "8.7.0" },
like that:{
"name":"node-example",
"version":"1.0.0",
"description":"This example is so cool.",
"main":"web.js",
"scripts":{
"test":"echo \"Error: no test specified\" && exit 1"
},
"keywords":[
"example",
"heroku"
],
"author":"jane-doe",
"license":"MIT",
"engines":{
"node":"8.7.0"
}
}
git add package.json && git commit -m "Specified node version"
git push heroku master
Reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With