Seedstars / django-react-redux-base

Seedstars Labs Base Django React Redux Project
MIT License
2.66k stars 341 forks source link

Uncaught SyntaxError: Unexpected token < #90

Closed m2jobe closed 7 years ago

m2jobe commented 7 years ago

I frequently get this error after running "yarn run dev" and running the server.

This is the only error output : app.b8da97e0aa7de58fcb04.js:1 Uncaught SyntaxError: Unexpected token < vendor.b8da97e0aa7de58fcb04.js:1 Uncaught SyntaxError: Unexpected token <

However sometimes it works when I ran "yarn run dev", not sure what im missing or why this occurs sometimes?

lfrodrigues commented 7 years ago

Please be sure you're using node LTS and that you have no error in the build process.

m2jobe commented 7 years ago

Im using node v6.11.3 and there is no error in the build process. When i use docker to run everything I dont run into this problem?

lfrodrigues commented 7 years ago

So it means you have something in your system that is causing the problem. That's why we use docker, to make sure everyone has a stable environment.

We use same version of nodejs but no errors :)

What browser is showing the error?

m2jobe commented 7 years ago

Same error on firefox and chrome image

m2jobe commented 7 years ago

Ok I think I've got it working but still not sure why. Doing the following steps seems to get it working most of the time:

lfrodrigues commented 7 years ago

Ok, I see you're using gunicorn, you need to restart it every time you rebuild the js.

In dev we run

./manage.py runserver 

Closing this as you're not running the server as suggested in README. If you run the commands from README and still have problems please reopen.