Getting build "Error parsing bundle asset <bundle.js> no such file" error during webpack 4 with terser plugin

See original GitHub issue

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/react

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:closed
  • Created 9 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
aviadavicommented, Dec 18, 2022

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

0reactions
aviadavicommented, Dec 17, 2022

I can’t omit this ecma option 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found