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

Use of "const" in strict mode #88

Closed
awmartin opened this issue Dec 5, 2015 · 3 comments
Closed

Use of "const" in strict mode #88

awmartin opened this issue Dec 5, 2015 · 3 comments

Comments

@awmartin
Copy link

awmartin commented Dec 5, 2015

This error occurs on a new install, after cloning the repo, running npm install, and running npm run hot-server.

server.js doesn't seem to be a true JavaScript file, regardless of the .js extension. In addition to the error below, there is a CoffeeScript-like closure using => and string interpolation using backticks. All of these prevent npm run hot-server from running. Is there a dependency not installed with npm install?

/Users/awmartin/Dropbox/Playground/electron-react-boilerplate/server.js:4
const path = require('path');
^^^^^
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 Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

npm-debug.log.txt

@chentsulin
Copy link
Member

Which node version you are using? Now required node >=4.
https://github.com/chentsulin/electron-react-boilerplate/blob/master/package.json#L104

@awmartin
Copy link
Author

awmartin commented Dec 6, 2015

That was it. Perhaps some documentation in the README or an error if the version doesn't match would help? Thanks.

@awmartin awmartin closed this as completed Dec 6, 2015
chentsulin added a commit that referenced this issue Dec 6, 2015
Close #88, add a node, npm version note
@chentsulin
Copy link
Member

@chentsulin chentsulin reopened this Dec 7, 2015
chentsulin added a commit that referenced this issue Dec 9, 2015
Close #88, check dev engine for node and npm
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