webpack-bundle-analyzer: 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
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 7
- Comments: 17 (2 by maintainers)
Commits related to this issue
- fix(ui): change biuld optimization for parralel option dropping it to 2 for the time being. seeing a lot of failures in CI when parallel is set to true. issue aligns with webpack issue: https://gith... — committed to influxdata/influxdb by jsteenb2 4 years ago
- fix(ui): change biuld optimization for parralel option dropping it to 2 for the time being. seeing a lot of failures in CI when parallel is set to true. issue aligns with webpack issue: https://gith... — committed to influxdata/influxdb by jsteenb2 4 years ago
- fix(ui): change biuld optimization for parralel option dropping it to 2 for the time being. seeing a lot of failures in CI when parallel is set to true. issue aligns with webpack issue: https://gith... — committed to influxdata/influxdb by jsteenb2 4 years ago
- fix(ui): change biuld optimization for parralel option dropping it to 2 for the time being. seeing a lot of failures in CI when parallel is set to true. issue aligns with webpack issue: https://gith... — committed to influxdata/ui by jsteenb2 4 years ago
always happen in webpack5
A possible workaround to make it work, in case you have an output directory named
dist
:hello,This is my project, you can perform the following steps
same issue here. local macos builds fine, and remote CI produces this error saying:
webpack version not locked using
"webpack": "^4.16.5",
@vnues Can you provide example of the problem?