Sentry-javascript: Error: Can't resolve 'domain' in @sentry/hub/dist

Created on 23 Oct 2018  Â·  17Comments  Â·  Source: getsentry/sentry-javascript

Package + Version

  • [x] @sentry/browser
  • [ ] @sentry/node
  • [ ] raven-js
  • [ ] raven-node _(raven for node)_
  • [ ] other:

Version:

4.2.0

Description

Building an Angular project with @sentry/browser v4.2.0 produces the error:

ERROR in ./node_modules/@sentry/hub/dist/hub.js
Module not found: Error: Can't resolve 'domain' in 'node_modules/@sentry/hub/dist'

Most helpful comment

OK, I've found a workaround:
https://github.com/getsentry/sentry-javascript/pull/1679/commits/9cf2c4bc18fe0d58579d79ffc02a2b760c275bb1#diff-f42b1df1354d117face937b0ba20beb0

This should fix it, releasing a fix soon.

All 17 comments

Thx for reporting this, fix will soon be released.

Fixed in 4.2.1

I have 4.2.1 installed and am still seeing this issue. I just upgraded to Angular 7.

Also seeing issue, but as a warning, with @sentry/browser 4.2.1 and Angular 7.0.0

WARNING in ./node_modules/@sentry/hub/dist/hub.js
Module not found: Error: Can't resolve 'domain' in '/<project-dir>/node_modules/@sentry/hub/dist'

Can I ask you guys what kind of packager are you using?

@HazAT we are using the angular-cli

Same here with:

angular-cli 7.0.2
npm 6.4.1
node 10.9.0

Output on ng serve

WARNING in ./node_modules/@sentry/hub/dist/hub.js
Module not found: Error: Can't resolve 'domain' in '/my-app-proto/node_modules/@sentry/hub/dist'

Doesn't seem to stop any functionality, errors are beings sent correctly.

Yeah, I am currently digging into this, webpack outputs this warning, our SDK works.
I am looking for workaround that webpack doesn't spit out this warning.

OK, I've found a workaround:
https://github.com/getsentry/sentry-javascript/pull/1679/commits/9cf2c4bc18fe0d58579d79ffc02a2b760c275bb1#diff-f42b1df1354d117face937b0ba20beb0

This should fix it, releasing a fix soon.

please release an update soon.. i cant wait to use this in my application

@Prtkpwr You should be able to use it right now anyway, it's "just" a warning.
We are still testing stuff to make sure we do not regress.

Confirming we're seeing this in a Vue CLI 3 project with webpack 4. Just a warning, seems functional otherwise.

Thanks for jumping on this @HazAT

I am using it on angular. It throws warning and then it stops all next
processes..

On Thu 25 Oct, 2018, 1:02 AM EyePulp, notifications@github.com wrote:

Confirming we're seeing this in a Vue CLI 3 project with webpack 4. Just a
warning, seems functional otherwise.

Thanks for jumping on this @HazAT https://github.com/HazAT

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/getsentry/sentry-javascript/issues/1670#issuecomment-432798060,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbsAulcUjojrSKvAf62x1rSUL8YnRok6ks5uoMBbgaJpZM4X00g1
.

4.2.2 is on it's way now

That's a very good new.. thanks for the quick support. :)

On Thu 25 Oct, 2018, 2:08 PM Daniel Griesser, notifications@github.com
wrote:

4.2.3 is on it's way now

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/getsentry/sentry-javascript/issues/1670#issuecomment-432964192,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbsAuhF5pqyfZIFoF9HlO0Qn1iDpLGqYks5uoXh6gaJpZM4X00g1
.

Perfect, cheers!
I can confirm I'm no longer seeing this on:

angular-cli 7.0.2
npm 6.4.1
node 10.9.0
@sentry/browser 4.2.3

No more warning under Vue. Nice work - cheers.

Was this page helpful?
0 / 5 - 0 ratings