PacktPublishing / Full-Stack-React-Projects-Second-Edition

Full-Stack React Projects - Second Edition, published by Packt
MIT License
467 stars 541 forks source link

Error: Module build failed... server/express.js: Unexpected token (52:10) #1

Closed Mazuco closed 4 years ago

Mazuco commented 4 years ago

Appear this error when lauch the command:

yarn start or yarn development

Error: Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: /home/mz2/teste/server/express.js: Unexpected token (52:10)

`const markup = ReactDOMServer.renderToString( sheets.collect(

^ `
shamahoque commented 4 years ago

This error is not thrown if you are running the code directly from this repository. Maybe an extra character was copied, if you copy-pasted this code from the book. It is difficult to assess this issue without access to the code you are running.

Mazuco commented 4 years ago

ok