NAVADMC / ADSM

A simulation of disease spread in livestock populations. Includes detection and containment simulation.
Other
10 stars 5 forks source link

Any tips on using the django-webpack-loader with this app? #776

Open mgahan opened 7 years ago

mgahan commented 7 years ago

I have been struggling getting the app to run on a Linux box and my errors seem to be related to the webpack-loader.

OSError at /setup/Scenario/1/
Error reading /usr/src/app/ADSM/webpack-stats.json. Are you sure webpack has generated the file and the path is correct?

Has anyone used django-webpack-loader (https://github.com/owais/django-webpack-loader) with this app and any tips on how to get past this error?

BryanHurst commented 7 years ago

@mgahan once you have your dev environment setup with all the python dependencies (pip install -r Requirements.txt and pip install -r Requirements-Nix.txt) and Node dependencies (npm install) installed, then you need to launch the Django server in a non-standard way.

Normally, you do python manage.py runserver. In this case, it won't properly launch webpack to compile the client libraries.

The correct step would be to run python manage.py devserver You can also pass in --dev if you want some client side react debug tools compiled in. When you run the server in this way, after you see the normal Django startup, you will see a webpack compile message come up shortly after (may take a minute). Once that message is seen, you can navigate to the page. Note that the browser will wait continually until webpack is done compiling.