#Attempted import error: '_optionalChain' is not exported from '@sentry/core' (imported as …

5 messages · Page 1 of 1 (latest)

pine eagle
#

I've used Sentry at previous jobs and liked it; now I'm trying to set it up at my current workplace. I followed the setup instructions for NextJS and it seems to work, but my server logs are flooded with errors like this for each page:

Import trace for requested module:
./app/(app)/text-to-speech/page.tsx

./app/(app)/text-to-speech/page.tsx
Attempted import error: '_nullishCoalesce' is not exported from '@sentry/core' (imported as '_nullishCoalesce').

Import trace for requested module:
./app/(app)/text-to-speech/page.tsx

./app/(app)/text-to-speech/page.tsx
Attempted import error: '_optionalChain' is not exported from '@sentry/core' (imported as '_optionalChain').

When I search for this I find lots of people with similar errors associated with running old versions of Sentry packages. But my use case is a brand new installation. Not sure what's going on here, any ideas?

#

package.json has "@sentry/nextjs": "^8",

lavish notch
#

which package manager are you using?

#

@sentry/core should be installed as well as it is a dependency of @sentry/nextjs

worn gust
#

a) What package manager are you using?
b) Can you try doing "@sentry/nextjs": "^8.42.0"?