Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webpack-bundle-tracker not creating webpack-stats.json?

I am trying to use Vue and Django together as described in this article. Everything seems to be working except for the webpack-bundle-tracker. I'm pretty sure that webpack-bundle-tracker is not even installed as this happens when I run yarn add webpack-bundle-tracker --dev:

yarn add v1.22.4
info No lockfile found.
[1/4] 🔍  Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/core-js: self signed certificate in certificate chain".

However when I run npm install --save-dev webpack-bundle-tracker it seems to work? but nothing really changes and no webpack-stats.json file is generated.

The other thing could be the django-webpack-loader, as when I ran pip install django-webpack-loader gives off a bunch of permissions errors, but it worked when I ran pip install django-webpack-loader --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org.

The error django gives me when I try to open my vue/django test page:

Error reading /Users/$ME/Dev/digiproj/vue_frontend/webpack-stats.json. Are you sure webpack has generated the file and the path is correct?

Just not sure where to go from here and would greatly appreciate any help.

like image 615
jec1918 Avatar asked Oct 16 '22 02:10

jec1918


1 Answers

I had the same issue, also running Django with django-webpack-loader, and I also found that the webpack-stats.json file was not being generated. I fixed it by downgrading webpack-bundle-tracker to 0.4.3. I'm not sure why the latest version of this package does not work.

like image 154
azwier Avatar answered Nov 15 '22 06:11

azwier