0

Using Webpack, and following survivejs tutorial.

I've succesfully ran

npm run build

And got index.html and bundle.js inside a build directory.

When I try to put these on my server folder, and run index.html I get the following error:

Uncaught SyntaxError: Unexpected token { 
From bundle.js:2

My web folder can present html files.

What can be the reason and how should I deploy my react app to the server in the simplest way possible?

Juho Vepsäläinen
  • 26,573
  • 12
  • 79
  • 105
user1553825
  • 160
  • 1
  • 1
  • 6
  • Is this error happening on the browser? – Andre Pena Jul 26 '15 at 16:22
  • Author here, can you join me at https://gitter.im/survivejs/webpack_react ? Alternatively we can try Stack Overflow chat. I'm going to need some additional information to be able to help with this. – Juho Vepsäläinen Jul 27 '15 at 05:55
  • This isn't enough information to troubleshoot. What's the error specifically pointing at? If the code is minified, unminify it and look for the error again. Please add more details to your question. – WiredPrairie Jul 27 '15 at 10:45

1 Answers1

0

Thanks everyone! Found what was the cause...

Apparently there were files required in a few files that had an uppercase on the first letter and for some reason on my local host it managed to pass build, but on the remote server it couldn't... strange!

Thanks

user1553825
  • 160
  • 1
  • 1
  • 6