question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Regression] 5.15.4 cannot be bundled with webpack (ENOENT during build, unlike 5.14.2)

See original GitHub issue

Package + Version

  • Works: @sentry/browser 5.14.2
  • Broken: @sentry/browser 5.15.4

Environment

Node 10.15.3, NPM 6.13.4, Webpack 4.41.5

webpack.config.js:

module.exports = {
    "mode": "none",
    "entry": "./web/webroot.js",
    "output": {
        "path": __dirname+'/web/release/',
        "filename": "bundle.js"
    }
}

Description

After running npm update which updated @sentry/browser from 5.14.2 to 5.15.4 the project no longer builds.

Error reported:

ERROR in ./node_modules/@sentry/browser/esm/integrations/index.js
Module build failed: Error: ENOENT: no such file or directory, open 'C:\dev\2020\table-editor\node_modules\@sentry\browser\esm\integrations\index.js'
 @ ./node_modules/@sentry/browser/esm/index.js 5:0-54 15:78-97
 @ ./web/webroot.js

ERROR in ./node_modules/@sentry/browser/esm/transports/index.js
Module build failed: Error: ENOENT: no such file or directory, open 'C:\dev\2020\table-editor\node_modules\@sentry\browser\esm\transports\index.js'
 @ ./node_modules/@sentry/browser/esm/index.js 6:0-43 16:0-52
 @ ./web/webroot.js

ERROR in ./node_modules/@sentry/core/esm/index.js
Module build failed: Error: ENOENT: no such file or directory, open 'C:\dev\2020\table-editor\node_modules\@sentry\core\esm\index.js'
 @ ./node_modules/@sentry/browser/esm/index.js 3:0-64 15:60-76
 @ ./web/webroot.js

ERROR in ./node_modules/@sentry/types/esm/index.js
Module build failed: Error: ENOENT: no such file or directory, open 'C:\dev\2020\table-editor\node_modules\@sentry\types\esm\index.js'
 @ ./node_modules/@sentry/browser/esm/exports.js 1:0-50 1:0-50 1:0-50
 @ ./node_modules/@sentry/browser/esm/index.js
 @ ./web/webroot.js

ERROR in ./node_modules/@sentry/utils/esm/index.js
Module build failed: Error: ENOENT: no such file or directory, open 'C:\dev\2020\table-editor\node_modules\@sentry\utils\esm\index.js'
 @ ./node_modules/@sentry/browser/esm/index.js 4:0-48 10:14-29
 @ ./web/webroot.js

Describe your issue in detail, ideally, you have a reproducible demo that you can show.

TLDR: Haven’t expected a single-digit minor version npm update breaking the build. Assuming the problem on the Sentry side because the webpack config is minimal (see above).

Pinned dependency versions to 5.14.2 for the time being, hope for the fix or hints on what could be suspect with my configuration.

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
xon52commented, May 2, 2020

As a follow up, error is gone. Don’t know what changed, but running v5.15.5 with no issues now. I added and removed the packages a couple of times, and ran npm ci. Worth a shot if anyone else runs into this.

0reactions
kamilogorekcommented, Jul 2, 2021

Closing the issue, as it seems like the original issue has been resolved. Please do not hesitate to ping me if it is still relevant, and I will happily reopen and work on it. Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack bundle ENOENT: no such file or directory fs ...
When executing the bundle we get an error Error: ENOENT: no such file or directory, scandir '/innerLib' because webpack does not know to ......
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
Bug:128538 - "sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-apps/net-tools" status:UNCONFIRMED resolution: severity:enhancement ...
Read more >
Externals - webpack
The externals configuration option provides a way of excluding dependencies from the output bundles. Instead, the created bundle relies on that dependency ...
Read more >
How I solved and debugged my Webpack issue through trial ...
js ) and one of the source files contains an error, the stack trace will simply point to bundle.js . This isn't always...
Read more >
Bundling Applications with Webpack - AWS SDK for JavaScript
Web applications in browser scripts or Node.js use of code modules creates dependencies. These code modules can have dependencies of their own, resulting...
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