-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
render _bundle error: TypeError: expected string or bytes-like object #352
Comments
npm run build appears to run fine - lost as to how to debug further |
Have tried to upgrade all packages to node v18.17.1 compliant - still see same issue as above |
|
@abadger1 the reason is because you use previously generated output file 'webpack-stats.json'. delete it! |
@abadger1, I just upgraded my legacy python project and encountered the exact same problem. The issue was that my package.json was using an old version of webpack-bundle-tracker, which was v0.7.0. After upgrading my webpack-bundle-tracker to v2.0.1 (the same as django-webpack-loader) and updating my webpack.config.js according to the latest 'configuring-webpack-bundle-tracker' section in the readme, I reran the following command:
Subsequently, I successfully solved the problem. |
Thanks @AntonBox and @grimmq52156 ! I suppose this is a version-related problem, so I'm closing this. |
error seen in ./manage.py runserver
tags = utils.get_as_tags(
File "/home/dave/skyscanner/venv/lib/python3.10/site-packages/webpack_loader/utils.py", line 71, in get_as_tags
bundle = _get_bundle(loader, bundle_name, extension)
File "/home/dave/skyscanner/venv/lib/python3.10/site-packages/webpack_loader/utils.py", line 47, in _get_bundle
bundle = loader.get_bundle(bundle_name)
File "/home/dave/skyscanner/venv/lib/python3.10/site-packages/webpack_loader/loader.py", line 116, in get_bundle
filtered_chunks = self.filter_chunks(chunks)
File "/home/dave/skyscanner/venv/lib/python3.10/site-packages/webpack_loader/loader.py", line 58, in filter_chunks
ignore = any(regex.match(chunk)
File "/home/dave/skyscanner/venv/lib/python3.10/site-packages/webpack_loader/loader.py", line 58, in
ignore = any(regex.match(chunk)
TypeError: expected string or bytes-like object
venv) ➜ src git:(main) ✗ node -v
v14.21.3
(venv) ➜ src git:(main) ✗ npm -v
6.14.18
(venv) ➜ src git:(main) ✗ pip list | grep webpack
django-webpack-loader 2.0.1
(venv) ➜ src git:(main) ✗
Django version 4.2.4, using settings 've.settings.development'
The text was updated successfully, but these errors were encountered: