react-universal-blog icon indicating copy to clipboard operation
react-universal-blog copied to clipboard

ERROR in ./app-client.js

Open princefishthrower opened this issue 7 years ago • 1 comments

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 [email protected] --save-dev I get the same error. Any ideas? I'm on mac, node version 6.11.4, npm version 5.5.1

princefishthrower avatar Oct 13 '17 18:10 princefishthrower

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

benkline avatar Aug 23 '18 16:08 benkline