question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
conorhastingscommented, Jul 22, 2016

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

1reaction
olivier-wcommented, Jul 22, 2016

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM install error "Unexpected token < in JSON at position 0"
Do the following: Delete the node_modules folder. Delete package-lock.json file. Run npm install again.
Read more >
Unexpected token { encountered when running `npm start`
In order to resolve this syntax error, you just need to update the version of your npm package to the latest version, as...
Read more >
Common errors | npm Docs
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >
npm clear cache - Javatpoint
This issue comes into existence when there is no Git installed on your system. The error may look something as shown below. ......
Read more >
How to fix the Whitescreen After a Static Deployment with ...
But as you visit the site – instead of your freshly deployed app ... If you created your React app with create-react-app, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found