netguru / create-react-app

Create React apps with no build configuration.
MIT License
14 stars 6 forks source link

Failed to compile #9

Closed RafalWilinski closed 7 years ago

RafalWilinski commented 7 years ago

Is this a bug report?

Yes.

Steps to reproduce:

  1. create-react-app my-app --scripts-version netguru-react-scripts
  2. yarn start OR npm start

Result:

Failed to compile.

./src/index.js
Module parse failed: /Users/Rafal/Node/twitter-suggestions/front/node_modules/react-hot-loader/webpack.js!/Users/Rafal/Node/twitter-suggestions/front/node_modules/babel-loader/lib/index.js??ref--1-oneOf-1-1!/Users/Rafal/Node/twitter-suggestions/front/node_modules/eslint-loader/index.js??ref--0-0!/Users/Rafal/Node/twitter-suggestions/front/src/index.js Unexpected token (11:4)
You may need an appropriate loader to handle this file type.
| function render(Component) {
|   ReactDOM.render(
|     <AppContainer>
|       <Component />
|     </AppContainer>,
^C

Can you also reproduce the problem with npm 4.x?

Yes.

Environment

  1. node -v: 8.2.1
  2. npm -v: 4.6.1
  3. yarn --version (if you use Yarn): v0.27.5
  4. npm ls react-scripts (if you haven’t ejected):
  5. Operating system: OSX
papermana commented 7 years ago

Can't reproduce with:

  1. Node 8.5.0.
  2. npm 5.4.1.
  3. Yarn 1.0.1.
  4. No custom react scripts.
  5. macOS.

So essentially the same setup, just newer versions of some programs.

The error seems like a problem parsing JSX but why it would fail, I don't know... A minimal working example might help.