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.

Sentry build upgrade from 5.6.3 to 5.7.x fails in jenkins due to missing sourcemap

See original GitHub issue

Package + Version

  • [5.7.0 ] @sentry/browser

Version:

5.6.3
5.7.x

Description

At build time on a jenkins server after trying to upgrade from ^5.6.3 to 5.7.x (I tried ^5.7.0 and ^5.7.1) I got the same error both times:

Screen Shot 2019-10-17 at 10 16 41 AM

ERROR in /home/centos/workspace/frontend-apps_PR-1832/node_modules/@sentry/utils/esm/is.js
 Module build failed (from /home/centos/workspace/frontend-apps_PR-1832/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
 Error: File lib.dom.d.ts does not have a sourceFile.

I could not reproduce this on local npm run xxxx builds or npm build xxxxx. However this happened ever time if the Sentry version was updated on the jenkins server, likely due to additional configuration settings I’m assuming. I have @sentry/browser installed, no sentry/sourcemaps.

Reverting to 5.6.3 allows the build to work as normal.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kamilogorekcommented, Oct 17, 2019

That’s very odd. lib.dom.d.ts is a built-in typescript module and it shouldn’t be missing in any scenario. Can you post your tsconfig/webpack.config please? I’ll investigate it soon.

1reaction
jeffvandalsumcommented, Oct 17, 2019

Can confirm - also ran into the same issue starting 2 days ago running 5.7.X.

ERROR in ./node_modules/@sentry/utils/esm/misc.js
  Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
  Error: File lib.dom.d.ts does not have a sourceFile.
    at Object.getSourceFile (/usr/src/app/node_modules/@angular-devkit/build-optimizer/src/helpers/transform-javascript.js:86:23)
    at findSourceFile (/usr/src/app/node_modules/typescript/lib/typescript.js:87549:29)
    at /usr/src/app/node_modules/typescript/lib/typescript.js:87457:85

Reverting to 5.6.3 also fixed the problem. Thanks @OrganicCat

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Source Maps for JavaScript
Once completed, use the sourcemaps explain command, by calling it with the event ID that can be found at the top of the...
Read more >
Configure UI completely broken after upgrade to 2.264
After an update of Jenkins from 2.263 to 2.291 I faced the issues mentioned here (UI looked strange, changes in job configuration could...
Read more >
Devuan GNU+Linux
Devuan GNU+Linux is a Linux distribution forked from Debian in 2015. The project's primary goal is to provide a variant of Debian without ......
Read more >
RUM source map API | Kibana Guide [8.5]
Create or update a source map for a specific service and version. Privilegesedit. The user accessing this endpoint requires All Kibana privileges for...
Read more >
Pinpoint Those Pesky Minified Javascript Errors With Sentry
Wait, where's that? — Darn! That's exactly what source maps help you fix, to map this error location to the line of code...
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