Skip to content

fix(ember): Use correct import from @sentry/browser #3077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

mydea
Copy link
Member

@mydea mydea commented Nov 26, 2020

The current code import Sentry from '@sentry/browser'; seems to work but is not actually correct, as @sentry/browser has no default export. I noticed this when trying out using embroider to build our app, where it warned me about this.

@mydea mydea requested a review from kamilogorek as a code owner November 26, 2020 08:58
@kamilogorek kamilogorek merged commit 36eddb2 into getsentry:master Nov 26, 2020
@kamilogorek
Copy link
Contributor

Good catch, thanks!

@mydea mydea deleted the fn/ember-correct-import branch November 26, 2020 13:25
@krisdages
Copy link

krisdages commented Dec 5, 2020

@kamilogorek I ran into this same issue in my project today with both the browser and node packages.

Is it possible to make import Sentry from "@sentry/<browser|node> work?
If I edit index.js and add

exports.default = exports;

it seems to fix the issue. Not sure if there is any downside to doing this.

It's potentially a big problem to run into since an error calling ([undefined] Sentry).init() means the error itself doesn't get reported ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants