django-vuejs-tutorial icon indicating copy to clipboard operation
django-vuejs-tutorial copied to clipboard

Problem in configuring webpack?

Open GadhariSachin opened this issue 6 years ago • 2 comments

Hi Michael, I am new to django-webpack and I am getting the following error while running django server. I also gone through issue created regarding the same, but its not resolving my problem.

Error reading webpack-stats.json. Are you sure webpack has generated the file and the path is correct?

Can you help me out to get through??

GadhariSachin avatar Apr 05 '19 09:04 GadhariSachin

Hello. Did you run ./node_modules/.bin/webpack to make sure the necessary files are created?

michaelbukachi avatar Apr 05 '19 22:04 michaelbukachi

I had the same problem, so what i did is cd to node_modules/.bin then i typed webpack, what happens is that ur bundles folder that contains the app.js AND the webpack-stats.json file end up being created in node_modules/.bin instead of the root directory of the django project if you move those files into the correct path that will fix ur issue

i did it this way because when i type ./node_modules/.bin/webpack in cmd it doesnt work, and my workaround caused the files to be saved in the wrong directory

for the future you could try running node_modules\.bin\webpack in the root directory of the django project

MohammadRafik avatar Apr 14 '19 18:04 MohammadRafik