I need a version that allows ‘let’ declarations. Running with --harmony tags, “use strict” and everything else is still giving me the error:
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
I seem to be stuck with Node 4.2.6. Any work arounds?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You can install Node.js version 6 or 7 on Ubuntu 16.04 by following the official guide: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions Instead of doing the install again (the second line), you would update and upgrade:
sudo apt update && sudo apt dist-upgrade
I generally recommend the repositories maintained by NodeSource. They’ve never failed me when I setup NodeJS for clients.
https://github.com/nodesource/distributions
7.x
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - \
&& sudo apt-get install -y nodejs
6.x
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - \
&& sudo apt-get install -y nodejs
ect.
That being said, you need to remove any current versions before you install the above (ideally).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.