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

Can't npm start new app, SyntaxError: Unexpected token => on a fresh install #82

Closed
olivier-w opened this issue Jul 22, 2016 · 10 comments · Fixed by #88
Closed

Can't npm start new app, SyntaxError: Unexpected token => on a fresh install #82

olivier-w opened this issue Jul 22, 2016 · 10 comments · Fixed by #88

Comments

@olivier-w
Copy link

olivier-w commented Jul 22, 2016

Edit from maintainers: the project requires Node >= 4.0.
We’ll fix the CLI to report an error in earlier versions.


I can't get the local server started. My steps to the error:

  • npm install -g create-react-app
  • create-react-app hello
  • No errors creating the app
  • cd hello
  • npm start
> hello@0.0.1 start /Users/olivier/Sites/sandbox/hello
> react-scripts start

/Users/olivier/Sites/sandbox/hello/node_modules/react-scripts/scripts/start.js:23
var isSmokeTest = process.argv.some(arg =>
                                        ^^
SyntaxError: Unexpected token =>
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Using npm v3.10.5 on OS X 10.11.6

@conorhastings
Copy link
Contributor

@olivier-w what node version are you using?

@olivier-w
Copy link
Author

olivier-w commented Jul 22, 2016

@conorhastings v0.12.7. Is there a recommended npm/node version that I should be using?

@conorhastings
Copy link
Contributor

@olivier-w This requires node >= 4 in order to run since it was uses arrow functions etc...

@olivier-w
Copy link
Author

@conorhastings Working with node v4.4.7 installed. Thank you!

@gaearon
Copy link
Contributor

gaearon commented Jul 22, 2016

Hmm wasn't CLI supposed to check for the Node version before installing?
Let's reopen for now to investigate.

@gaearon gaearon reopened this Jul 22, 2016
@hzoo
Copy link

hzoo commented Jul 22, 2016

@conorhastings
Copy link
Contributor

I also maybe missing something but i don't see an engines if i npm install react-scripts

@gaearon
Copy link
Contributor

gaearon commented Jul 22, 2016

Ah, good points. Want to fix this? 😄

@chrisfinazzo
Copy link

I think I just hit this bug. I know this was integrated but has the template been updated? Hate to ask, but I'm just getting my started with this (Coming from Ruby/HTML/SCSS)

Currently on Node 6.7.0 and npm 3.10.7.

@gaearon
Copy link
Contributor

gaearon commented Oct 4, 2016

If you have Node 6 you can't have this issue. Please file a new issue describing your problem in detail. Thanks!

nwolverson pushed a commit to nwolverson/create-react-app that referenced this issue Jun 29, 2017
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants