Skip to content

SyntaxError after following the setup instructions. #179

Closed
@dreadwail

Description

@dreadwail

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

Activity

gaearon

gaearon commented on Jul 25, 2016

@gaearon
Contributor

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!

dreadwail

dreadwail commented on Jul 25, 2016

@dreadwail
Author

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

gaearon

gaearon commented on Jul 25, 2016

@gaearon
Contributor

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

SandeepKushwaha

SandeepKushwaha commented on Jan 27, 2018

@SandeepKushwaha

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

gaearon commented on Jan 27, 2018

@gaearon
Contributor

@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.

locked and limited conversation to collaborators on Jan 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @dreadwail@gaearon@SandeepKushwaha

      Issue actions

        SyntaxError after following the setup instructions. · Issue #179 · facebook/create-react-app