SyntaxError: Use of const in strict mode? SyntaxError: Use of const in strict mode? selenium selenium

SyntaxError: Use of const in strict mode?


Updating nodejs solved the issue:

npm cache clean -fsudo npm install -g nsudo n stablenode --versionnode app.js

You have to run the second and third command as root/administrator.


n stable wouldn't do the trick for me. On the other hand,

nvm install stable

That actually got me to last nodejs version. Apparently n stable won't get pass v0.12.14 for me. I really don't know why.

Note: nvm is Node Version Manager, you can install it from its github page. Thanks @isaiah for noting that nvm is not a known command.


For me it was more simple to solve, just going to the Node web site, get and install the LTS version.