Getting build "Error parsing bundle asset <bundle.js> no such file" error during webpack 4 with terser plugin
See original GitHub issueIs there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
SDK Version
7.26.0
Framework Version
React 17.0.2
Link to Sentry event
No response
Steps to Reproduce
Getting the following upon build after adding @sentry/react SDK :
Setup: Webpack 4.44 React 17.0.2 Terser Plugin 2.3.8
Terser setup:
optimization: {
minimizer: [
new TerserPlugin({
cache: true,
parallel: true,
extractComments: false,
terserOptions: {
ecma: 7,
compress: {},
output: {
comments: false,
beautify: false
}
},
sourceMap: true,
})
]
},
Reproduce: run webpack
Getting:
94% after sealError parsing bundle asset <bundle.js> no such file
When I use older @sentry/react SDK (6.17.9) it works without any issues.
Expected Result
Webpack build should pass without any issue
Actual Result
Getting:
94% after sealError parsing bundle asset <bundle.js> no such file
When I use older @sentry/react SDK (6.17.9) it works without any issues.
Issue Analytics
- State:
- Created 9 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Error parsing bundle asset "*" no such file when mixing ...
Looks like mixing paths for output stats.json and webpack entries causes this error. Technical info. Webpack Bundle Analyzer version: 3.0.2 ...
Read more >webpack-bundle-analyzer
Error parsing bundle asset "*" no such file when mixing relative paths. Looks like mixing paths for output stats.json and webpack entries causes...
Read more >Webpack v5 builds with a module parsing error
from my understanding the error happens for a '.js' file and suggests a loader for such file has not been configured, but there...
Read more >webpack-bundle-analyzer
Error parsing bundle asset "your_bundle_name.bundle.js": no such file No bundles were parsed. Analyzer will show only original module sizes from stats file. To ......
Read more >TypeScript
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was able to build using webpack terser plugin 4.2.3 for webpack 4. it seems it solves it issue. Hence closing the ticket
I can’t omit this
ecmaoption as it’s mandatory to the project.I’m using Node 18.12.1 .
Also, the 6.17.9 is working well without build issue.