vtop
vtop copied to clipboard
SyntaxError: Use of const in strict mode
I have updated node and npm, but every time running, getting the error below. System is Ubuntu Server 14.04.
rolle@ghost:~$ vtop
/usr/local/lib/node_modules/vtop/app.js:3
const App = ((() => {
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/vtop/bin/vtop.js:6:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
What version of nodejs? You may need to run it via node directly with the --harmony flag.
I have v10.16.3. But I've tried different versions from 7 and up, everything outputs this same error. I have no idea how to run directly with --harmony, haven't used it before.
This is also strange because vtop works on other similar 14.04 server I have... humm.
Same issue here.
Ended up having to call node with the path to the app.js. With nvm and my version of Node, this ended up being:
node ~/.nvm/versions/node/v8.9.4/lib/node_modules/vtop/app.js