Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Use of const in strict mode #145

Open
ronilaukkarinen opened this issue Sep 11, 2019 · 3 comments
Open

SyntaxError: Use of const in strict mode #145

ronilaukkarinen opened this issue Sep 11, 2019 · 3 comments

Comments

@ronilaukkarinen
Copy link

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)
@Eeems
Copy link

Eeems commented Sep 11, 2019

What version of nodejs? You may need to run it via node directly with the --harmony flag.

@ronilaukkarinen
Copy link
Author

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.

@sunny
Copy link

sunny commented Jan 4, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants