Description
Hey team Sentry. Promising product evolution for sure, we are eager to try to integrating our logs with our error reporting. We've been added to the pilot, upgraded to @sentry/nextjs@9.14.0
and @sentry/node@9.14.0
and added import * as Sentry from '@sentry/nextjs'
to our central logging lib.
Now when we start the Next.js (15.2.3) frontend, we get an error Export logger doesn't exist in target module
. I've traced this down to an import of Sentry.logger in our middleware.ts
, where we log each incoming request. I'm slightly puzzled, as I assumed this code is only used server-side, but it looks like it's somehow imported into the clientside bundle at least in development.
Anything I should be trying differently? Here's a minimal repro: https://github.com/stefnnn/next-turbo-middleware
Originally posted by @stefnnn in #15916 (comment)