Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SyntaxError after following the setup instructions. #179

Closed
dreadwail opened this issue Jul 25, 2016 · 5 comments · May be fixed by rangle/create-react-app#15 or rangle/create-react-app#16
Closed

Comments

@dreadwail
Copy link

I followed the instructions in the README and ran into a SyntaxError right out of the gate. It seems like it's not interpretting as ES6:

hackday  $ create-react-app on-call-buddy
Creating a new React app in /Users/blakey/code/hackday/on-call-buddy.

Installing packages. This might take a couple minutes.
Installing react-scripts from npm...
\
> fsevents@1.0.14 install /Users/blakey/code/hackday/on-call-buddy/
node_modules/react-scripts/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/blakey/code/hackday/on-call-buddy/
node_modules/react-scripts/node_modules/fsevents/lib/binding/
Release/node-v14-darwin-x64/fse.node" is installed via remote

react-scripts@0.1.0 node_modules/react-scripts
└── fsevents@1.0.14 (nan@2.4.0)
Installing react and react-dom from npm...
react-dom@15.2.1 node_modules/react-dom

react@15.2.1 node_modules/react
├── object-assign@4.1.0
├── loose-envify@1.2.0 (js-tokens@1.0.3)
└── fbjs@0.8.3 
(ua-parser-js@0.7.10, immutable@3.8.1, promise@7.1.1, core-js@1.2.7, isomorphic-fetch@2.2.1)

Success! Created on-call-buddy at /Users/blakey/code/hackday/on-call-buddy.

Inside that directory, you can run several commands:
  * npm start: Starts the development server.
  * npm run build: Bundles the app into static files for production.
  * npm run eject: Removes this tool. If you do this, you can’t go back!

We suggest that you begin by typing:
  cd /Users/blakey/code/hackday/on-call-buddy
  npm start

Happy hacking!
hackday  $ cd on-call-buddy/
on-call-buddy  $ npm start
> on-call-buddy@0.0.1 start /Users/blakey/code/hackday/on-call-buddy
> react-scripts start

/Users/blakey/code/hackday/on-call-buddy/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
@gaearon
Copy link
Contributor

gaearon commented Jul 25, 2016

We require Node 4:

screen shot 2016-07-25 at 18 12 16

There is a bug in the CLI that it doesn’t check your Node version—that will be fixed in next release.

Thanks for reporting!

@gaearon gaearon closed this as completed Jul 25, 2016
@dreadwail
Copy link
Author

Ah. Thanks! My eyeballs scanned right over that one. Sorry for the noise.

@gaearon
Copy link
Contributor

gaearon commented Jul 25, 2016

No problem, we should’ve fixed our Node detection code earlier!

@SandeepKushwaha
Copy link

ReactJS creating an app got SyntaxError.
D:\Projects\ReactJS>create-react-app my-app
C:\Users\Sandeep\AppData\Roaming\npm\node_modules\create-react-app\node_modules\fs-extra\lib\util\assign.js:1
(function (exports, require, module, __filename, __dirname) {

SyntaxError: Invalid or unexpected token
at new Script (vm.js:51:7)
at createScript (vm.js:138:10)
at Object.runInThisContext (vm.js:199:10)
at Module._compile (module.js:624:28)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)

@gaearon
Copy link
Contributor

gaearon commented Jan 27, 2018

@SandeepKushwaha Commenting on old closed issues is not a very good way to get help. We don't read them generally. Please file a new issue if you experience problems.

@facebook facebook locked and limited conversation to collaborators Jan 27, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
3 participants