webpack-bundle-analyzer
webpack-bundle-analyzer copied to clipboard
Error parsing bundle asset "*" no such file when mixing relative paths
Error parsing bundle asset "*" no such file when mixing relative paths
Looks like mixing paths for output stats.json and webpack entries causes this error.
Technical info
- Webpack Bundle Analyzer version: 3.0.2
- Webpack version: 4.6.15
- Node.js version: 10.11.0
- npm/yarn version: 6.4.1
- OS: Archlinux
Debug info
Bundle analyzer is launched as npm script:
webpack --profile --json > dist/stats.json && webpack-bundle-analyzer dist/stats.json
And webpack entries look like that:
entry: {
'otherplace/bundle1': ['*', '*'],
'otherplace/bundle2': '*',
'otherplace/bundle3': '*',
'dist/bundle4': '.*',
'dist/bundle5': '.*',
},
So, when
webpack --profile --json > dist/stats.json && webpack-bundle-analyzer dist/stats.json
Errors like
Error parsing bundle asset "<absolute path>/dist/dist/bundle5.js": no such file (/dist/ appear twice)
Error parsing bundle asset "<absolute path>/dist/otherplace/bundle2": no such file (should be no /dist/, only /otherplace/)
appear, and no parsed size (only stat size) available, but when using
webpack --profile --json > stats.json && webpack-bundle-analyzer stats.json
everything works fine
What does * mean in the paths?
What does
*mean in the paths?
I just replaced the actual paths in the project
Probably there is something with joining paths from here: https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/src/analyzer.js#L50
I can create small demo project for this issue, if you want
I can create small demo project for this issue, if you want
Yes, it would help a lot.
@th0r:
https://github.com/Solant/bundle-analyzer-paths
npm run analyze:fine is intended behavior
npm run analyze:error shows described error
same issue here. local macos builds fine, and remote CI produces this error saying:
Child mini-css-extract-plugin node_modules/css-loader/index.js!node_modules/vue-loader/lib/loaders/stylePostLoader.js!node_modules/sass-loader/lib/loader.js!node_modules/vue-loader/lib/index.js??vue-loader-options!src/views/Video.page.vue?vue&type=style&index=0&id=01422a34&scoped=true&lang=css&:
Entrypoint mini-css-extract-plugin = *
[0] ./node_modules/css-loader!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Video.page.vue?vue&type=style&index=0&id=01422a34&scoped=true&lang=css& 162 bytes {0} [built]
+ 1 hidden module
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/vendors.cb3f9722098fcd2c8907.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/1.c26fe07aa377bd74cdf2.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/app.e5b23854adf630ec7091.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/3.902eabc18fbeb40958b0.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/4.e7e88988441cd90f96ea.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/5.706427295ce3457d8589.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/6.adf191adef5bc477f936.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/7.83db1aa0a0f4751e3f03.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/8.8dd0451db14c6295a8db.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/9.39df996a12dec23833f6.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/10.bdb90602a0cd2b799d62.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/11.7dd6ec8635d6f9a72611.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/12.fc237f1f81c92dc8330f.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/13.a377c93a2452a355bb3f.js": no such file
Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/runtime.9b6506fc815dcb500655.js": no such file
webpack version not locked using "webpack": "^4.16.5",
the same problem with me.
it is normal when build on mac os, but linux makes errors.
this is my package version
"webpack": "^4.38.0",
"webpack-bundle-analyzer": "^3.4.1",
"webpack-cli": "^3.3.6",
Same thing here, any thoughts?
A possible workaround to make it work, in case you have an output directory named dist:
webpack --profile --json > stats.json && webpack-bundle-analyzer stats.json dist/
@Solant thank you! But didn't help. In the end we've resolved it by adding second build, since it's always building OK on the second time in CI. First build is allowed to fail.
always happen in webpack5
@vnues Can you provide example of the problem?
@vnues Can you provide example of the problem?
hello,This is my project, you can perform the following steps
git clone [email protected]:art-design-ui/noov.js.git
npm i
npm run dev
The following prompt will occur

Is there any way for us to remove the extra noise right now?
Thanks for the discussion. Im having the same issue. I just cant find a way to resolve it. I get the following lines after trying to compile with web-pack 5. Will appreciate very much any guidance you may provide:
[webpack-dev-middleware] wait until bundle finished: /
Error parsing bundle asset "C:\Users\User\Desktop\VIRTUAL.COMPLETE part 7.4 - WEBPACK\frontend\dist\vendors.73ba6b8ee49c2cb5f002.js": no
such file
Error parsing bundle asset "C:\Users\User\Desktop\VIRTUAL.COMPLETE part 7.4 - WEBPACK\frontend\dist\runtime.499ef25336a0b3567e6c.js": no
such file
Error parsing bundle asset "C:\Users\User\Desktop\VIRTUAL.COMPLETE part 7.4 - WEBPACK\frontend\dist\main.6c2421e4fe194a5e1e65.js": no such file
No bundles were parsed. Analyzer will show only original module sizes from stats file.
Webpack Bundle Analyzer saved report to C:\Users\User\Desktop\VIRTUAL.COMPLETE part 7.4 - WEBPACK\frontend\dist\report.html
assets by path *.js 282 KiB
asset vendors.73ba6b8ee49c2cb5f002.js 210 KiB [emitted] [immutable] (name: vendors) (id hint: vendor)
asset runtime.499ef25336a0b3567e6c.js 61.1 KiB [emitted] [immutable] (name: runtime)
asset main.6c2421e4fe194a5e1e65.js 11.4 KiB [emitted] [immutable] (name: main)
asset main.css 10.9 KiB [emitted] (name: main)
asset index.html 341 bytes [emitted]
Entrypoint main 293 KiB = runtime.499ef25336a0b3567e6c.js 61.1 KiB vendors.73ba6b8ee49c2cb5f002.js 210 KiB main.css 10.9 KiB main.6c2421e4fe194a5e1e65.js 11.4 KiB
runtime modules 62.6 KiB 25 modules
orphan modules 14.3 KiB [orphan] 3 modules
javascript modules 173 KiB
modules by path ./node_modules/ 167 KiB 24 modules
modules by path ./src/ 6.14 KiB
modules by path ./src/screens/*.js 3.65 KiB
./src/screens/HomeScreen.js 3.4 KiB [built] [code generated]
+ 2 modules
./src/index.js 2.17 KiB [built] [code generated]
./src/style.css 323 bytes [built] [code generated]
./utils.js 227 bytes [built] [code generated]
css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/postcss-loader/dist/cjs.js!./src/style.css 10.4 KiB [built] [code generated]
ERROR in unable to locate 'C:/Users/User/Desktop/VIRTUAL.COMPLETE part 7.4 - WEBPACK/frontend/src/index.html' glob
0 (webpack 5.70.0) compiled with 1 error in 5859 ms
Looks like @agtemail11Soft your build is broken as webpack says it has errors. This is likely not an issue with webpack-bundle-analyzer and is not the same thing as what the first message in this issue is about.
same issue here. local macos builds fine, and remote CI produces this error saying:
Child mini-css-extract-plugin node_modules/css-loader/index.js!node_modules/vue-loader/lib/loaders/stylePostLoader.js!node_modules/sass-loader/lib/loader.js!node_modules/vue-loader/lib/index.js??vue-loader-options!src/views/Video.page.vue?vue&type=style&index=0&id=01422a34&scoped=true&lang=css&: Entrypoint mini-css-extract-plugin = * [0] ./node_modules/css-loader!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Video.page.vue?vue&type=style&index=0&id=01422a34&scoped=true&lang=css& 162 bytes {0} [built] + 1 hidden module Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/vendors.cb3f9722098fcd2c8907.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/1.c26fe07aa377bd74cdf2.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/app.e5b23854adf630ec7091.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/3.902eabc18fbeb40958b0.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/4.e7e88988441cd90f96ea.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/5.706427295ce3457d8589.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/6.adf191adef5bc477f936.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/7.83db1aa0a0f4751e3f03.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/8.8dd0451db14c6295a8db.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/9.39df996a12dec23833f6.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/10.bdb90602a0cd2b799d62.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/11.7dd6ec8635d6f9a72611.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/12.fc237f1f81c92dc8330f.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/13.a377c93a2452a355bb3f.js": no such file Error parsing bundle asset "/builds/xxxxxx/backend/resources/dist/assets/js/runtime.9b6506fc815dcb500655.js": no such filewebpack version not locked using
"webpack": "^4.16.5",
I had the same problem, did you solve it?