Skip to content

Instantly share code, notes, and snippets.

@smyja
Created March 6, 2020 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smyja/0c6145a7169a9934d1e0f9133cd80435 to your computer and use it in GitHub Desktop.
Save smyja/0c6145a7169a9934d1e0f9133cd80435 to your computer and use it in GitHub Desktop.
vue webpack django#
i keep getting this error when i run python manage.py runserver. i get the webpack-stats.json doesn't generate. i am thinking a write file plugin should be used to generate it when npm run dev command is entered. i am confused.
`` File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\core\handlers\base.py", line 145, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\core\handlers\base.py", line 143, in _get_response
response = response.render()
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\template\response.py", line 106, in render
self.content = self.rendered_content
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\template\response.py", line 83, in rendered_content
content = template.render(context, self._request)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\template\backends\django.py", line 61, in render
return self.template.render(context)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\template\base.py", line 171, in render
return self._render(context)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\template\base.py", line 163, in _render
return self.nodelist.render(context)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\template\base.py", line 937, in render
bit = node.render_annotated(context)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\template\base.py", line 904, in render_annotated
return self.render(context)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\django\template\library.py", line 192, in render
output = self.func(*resolved_args, **resolved_kwargs)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\webpack_loader\templatetags\webpack_loader.py", line 12, in render_bundle
tags = utils.get_as_tags(bundle_name, extension=extension, config=config, attrs=attrs)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\webpack_loader\utils.py", line 62, in get_as_tags
bundle = _get_bundle(bundle_name, extension, config)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\webpack_loader\utils.py", line 40, in _get_bundle
bundle = get_loader(config).get_bundle(bundle_name)
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\webpack_loader\loader.py", line 59, in get_bundle
assets = self.get_assets()
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\webpack_loader\loader.py", line 38, in get_assets
return self.load_assets()
File "C:\Users\USER\Desktop\bio\codex\vuecrow\venv\lib\site-packages\webpack_loader\loader.py", line 31, in load_assets
self.config['STATS_FILE']))
OSError: Error reading C:\Users\USER\Desktop\bio\codex\vuecrow\webpack-stats.json. Are you sure webpack has generated the file and the path is correct?
[06/Mar/2020 08:40:35] "GET / HTTP/1.1" 500 129259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment