Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

ERROR in ./app-client.js #7

Open
princefishthrower opened this issue Oct 13, 2017 · 1 comment
Open

ERROR in ./app-client.js #7

princefishthrower opened this issue Oct 13, 2017 · 1 comment

Comments

@princefishthrower
Copy link

I tried running npm run development after a fresh npm install and I get the following error from webpack:

ERROR in ./app-client.js
Module build failed: SyntaxError: Unexpected token (12:2)

  10 | 
  11 | const Routes = (
> 12 |   <Router history={history}>
     |   ^
  13 |     { routes }
  14 |   </Router>
  15 | )

Not sure what is going on... I thought it could be with react-router, since it is listed in package.json as 1.0.1 and up and I know it had some breaking changes at somepoint with how one defines a Router but even with a npm install react-router@1.0.1 --save-dev I get the same error. Any ideas? I'm on mac, node version 6.11.4, npm version 5.5.1

@benkline
Copy link

benkline commented Aug 23, 2018

webpack is not able to parse that JS until you tell it how -> add the .babelrc file to your stack.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants