There is a Django + reactjs + reflux project, the following error crashes when launched:
Performing system checks... Unhandled exception in thread started by <function check_errors. <locals>.wrapper at 0x7f121c9e6840> Traceback (most recent call last): File "/home/dmr/pfo_ve/lib/python3.4/site- packages/django/utils/autoreload.py", line 222, in wrapper fn(*args, **kwargs) File "/home/dmr/pfo_ve/lib/python3.4/site- packages/django/core/management/commands/runserver.py", line 105, in inner_run self.validate(display_num_errors=True) File "/home/dmr/pfo_ve/lib/python3.4/site-packages/django/core/management/base.py", line 362, in validate return self.check(app_configs=app_configs, display_num_errors=display_num_errors) File "/home/dmr/pfo_ve/lib/python3.4/site-packages/django/core/management/base.py", line 414, in check raise CommandError(msg) django.core.management.base.CommandError: System check identified some issues: ERRORS: django.conf.settings.WEBPACK_LOADER: (django-webpack-loader.E001) Error while parsing WEBPACK_LOADER configuration HINT: Is WEBPACK_LOADER config valid? System check identified 1 issue (0 silenced). Here is my config: (webpack.config.js)
var path = require("path"); var webpack = require('webpack'); var BundleTracker = require('webpack-bundle-tracker'); module.exports = { context: __dirname, entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './assets/js/index' ], output: { path: path.resolve('./assets/bundles/'), filename: '[name]-[hash].js', // Tell django to use this URL to load packages and not use STATIC_URL + bundle_name publicPath: 'http://localhost:3000/assets/bundles/' }, plugins: [ new webpack.HotModuleReplacementPlugin(), // don't reload if there is an error new webpack.NoErrorsPlugin(), new BundleTracker( {filename: './webpack-stats.json'} ) ], module: { loaders: [ // we pass the output from babel loader to react-hot loader { // JSX to JS test: /\.jsx?$/, exclude: /node_modules/, loaders: ['react-hot', 'babel'] }, { // TS to JS test: /\.ts$/, exclude: /node_modules/, loaders: ['react-hot', 'babel'] }, { // CSS test: /\.css$/, //exclude:/node_modules/, loader: "style-loader!css-loader" } ] }, resolve: { modulesDirectories: ['node_modules'], extensions: ['', '.js', '.jsx', '.ts', '.css'] } }; setting.py
WEBPACK_LOADER = { 'BUNDLE_DIR_NAME': 'bundles/', 'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json') } Tell me what could be the problem?