markfinger / python-react

Server-side rendering of React components
MIT License
1.62k stars 116 forks source link

Add a setting to prevent init-time npm install #20

Closed defrex closed 9 years ago

defrex commented 9 years ago

In production my running code doesn't have write permissions on itself, so this npm install fails. I added a setting to disable it so I can manage npm manually.

markfinger commented 9 years ago

Cool, thanks for that!

markfinger commented 9 years ago

This has been moved into django-node as part of a refactor of dependency handling.

There are now management commands to handle dependencies:

django-node also respects a setting INSTALL_PACKAGE_DEPENDENCIES_DURING_RUNTIME. To prevent runtime installation, add the following to your settings.

DJANGO_NODE = {
    'INSTALL_PACKAGE_DEPENDENCIES_DURING_RUNTIME': False
}

To avoid the runtime overhead, you will probably want to set it to False and run the install_package_dependencies command during during a deployment.

See markfinger/django-node#6 and markfinger/django-node#12