-
-
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
Attempted import error: '_optionalChain' is not exported from '@sentry/utils' (imported as '_optionalChain') #9534
Comments
Hi, can you share a reproduction example? Thanks! |
Also, could you check and make sure that all versions of |
We had a similar issue upgrading from an older version to sentry to 7.80.0. |
Hey, yeah, that is most probably the reason then. This method was introduced in v7.80.0 so if for some reason you are pulling in e.g. 7.79.0 of |
First of all you could release a new version of sentry/react-native, because that will depend on 7.80.0 as well, reducing version clutter. And even more so, since version before 7.77 have a security flaw. |
@finsterwalder I don't think this one is on us tbh. In this case, package managers and bundlers are the things that are complicating things. We strictly define all of our dependencies - what ends up being bundled or used by your app is out of our control. |
Yes sure. I'm just hinting at the transitive dependencies of other libraries, not of my code. |
@tmwBuidls Can you try what @finsterwalder did to resolve the issue? I recommend removing your |
You're right, this fixed it. One thing to note, and this is probably a bundler problem not Sentry, but the issue was arising I think as we're using a monorepo with turbo and pnpm and one of the apps had not been upgraded so for whatever reason the upgraded app was using utils from the older package. |
Since this issue is closed and has an older version of the SDK I have created a new issue. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
7.80.0
Framework Version
Next 14.0.2
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
Attempted import error: '_optionalChain' is not exported from '@sentry/utils' (imported as '_optionalChain')
Other things to note:
Expected Result
Attempted import error: '_optionalChain' is not exported from '@sentry/utils' (imported as '_optionalChain')
is not thrown/ loggedActual Result
The text was updated successfully, but these errors were encountered: