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. #8

Closed
kinjalgiri opened this issue Jul 24, 2016 · 3 comments
Closed

SyntaxError: Use of const in strict mode. #8

kinjalgiri opened this issue Jul 24, 2016 · 3 comments

Comments

@kinjalgiri
Copy link

[root@JLLT002 api]# node -v
v0.10.42
[root@JLLT002 api]# source ../env.sh; node index.js

/usr/share/nginx/react/stream-react-example/api/lib/cors/index.js:5
    const defaultAllowHeaders = ['Authorization', 'Content-Type'];
    ^^^^^
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/share/nginx/react/stream-react-example/api/index.js:51:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
[root@JLLT002 api]#

I also tried updating nodejs but same error again and again. I am using Cent OS 6.

@astrotars
Copy link
Contributor

@kinjalgiri what version of node.js are you running? have you tried passing in the harmony flag in when starting node? https://nodejs.org/en/docs/es6/

@kinjalgiri
Copy link
Author

[root@JLLT002 api]# node -v
v0.10.42

For --harmony flag, I will give it a try and let you know here.

@astrotars
Copy link
Contributor

You're way out of date. I'd recommend node 5.x.

On Wed, Jul 27, 2016, 1:53 AM Kinjalgiri Goswami notifications@github.com
wrote:

[root@JLLT002 api]# node -v
v0.10.42

For --harmony flag, I will give it a try and let you know here.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#8 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABRFBDkeCYit2_mLYnPcUkI3UyFgDinUks5qZw5vgaJpZM4JTiCJ
.

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

2 participants