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

javascript for .. of .. syntax not supported in my version of Node #1

Closed
lwthatcher opened this issue Feb 15, 2016 · 2 comments
Closed

Comments

@lwthatcher
Copy link
Collaborator

I've been trying to gather together the dependencies for the controller_server.js script, but once I've included the gameCord.js file, it complains because of the for.. of .. syntax used near the bottom:

/aml/home/lthatch1/game_generator/controller/gameCord.js:168
for (var m of searchSpace) {
^^
SyntaxError: Unexpected identifier
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. (/aml/home/lthatch1/game_generator/controller/controller_server.js:10:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)

It looks like I do not have support for that type of syntax, and unfortunately there is no other documentation declaring the list of dependencies or requirements. I'm not sure if I need to update Node, or something else?

I'm using v0.10.36 of NodeJS.

@herobd
Copy link
Owner

herobd commented Feb 15, 2016

for...of is ECMAScript6 and my Node.js is0.12.7, so it is just the older version of Node.js. I can change the syntax to not include that if you'd like. Also, I haven't got it running yet, so you'll hit bugs even if you do successfully run it.

@lwthatcher
Copy link
Collaborator Author

I'm assuming that this shouldn't be an issue anymore so long as I update my version of Node. Closing Issue.

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

No branches or pull requests

2 participants