-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Broken @sentry/vue jest mock #6037
Comments
Hi @Tofandel thanks for writing in! I have a couple of questions to get to the bottom of this:
Looking at the 7.16.0 Changelog, I don't see anything at the top of my head that would mess with the Vue SDK's exports. The only Vue PR was #5983 which just changes something under the hood of our routing instrumentation. Just to confirm, are you using our Vue routing instrumentation? I briefly tried reproducing this with Vite but your comment suggests you're using WebPack. Would you be able to provide a minimal repro app to debug this further? |
I also had a look at the commit history and could not see what would cause this, I'll look if it's possible it's an updated deep dependency, but I can always reproduce by switching between 7.15 and 7.16 I'm using webpack and vue2, I'll look into adding a reproduction repo |
So I'm building a repro, but in the meantime, the issue is only with jest and is due to
It seems this is what broke |
I found the cause of the issue within jest and opened a PR there, it seems the build may be the culprit as it now provides the module with the If anybody is interested in the repro https://github.com/Tofandel/sentry-vue-bug |
Is there an existing issue for this?
How do you use Sentry?
Self-hosted/on-premise
Which package are you using?
@sentry/vue
SDK Version
7.16
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
Simply use a dynamic import
Or
Expected Result
Sentry to initialize correctly
Actual Result
TypeError: init is not a function
This happened between 7.15 (last known working version) and 7.16
The
@sentry/core
dynamic import still seems to work, but theinit
one is specific to@sentry/vue
and cannot be used with a dynamic import anymoreThe text was updated successfully, but these errors were encountered: