Skip to content

NextJs 15.3 shows warning after adding Sentry #16091

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

Open
3 tasks done
ChristianKohler opened this issue Apr 17, 2025 · 2 comments
Open
3 tasks done

NextJs 15.3 shows warning after adding Sentry #16091

ChristianKohler opened this issue Apr 17, 2025 · 2 comments

Comments

@ChristianKohler
Copy link

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

9.13

Framework Version

15.3

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

  1. Install NextJs 15.3
  2. Add Sentry using the wizard
  3. Run npm run dev
  4. See the following warning

Expected Result

No warning or a better way to understand that this warning comes in combination with Sentry. Since this is a NextJs warning I started to look into the turbopack configuration..

Actual Result

next dev --turbopack

   ▲ Next.js 15.3.0 (Turbopack)
   - Local:        http://localhost:3000
   - Network:      http://192.168.215.4:3000
   - Experiments (use with caution):
     · clientTraceMetadata

 ✓ Starting...
 ✓ Compiled instrumentation Node.js in 379ms
 ✓ Compiled instrumentation Edge in 134ms
 ✓ Ready in 1210ms
++ ⚠ Webpack is configured while Turbopack is not, which may cause problems.
++ ⚠ See instructions if you need to configure Turbopack:
  https://nextjs.org/docs/app/api-reference/next-config-js/turbo
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Apr 17, 2025
@linear linear bot added the Bug label Apr 17, 2025
@lforst
Copy link
Member

lforst commented Apr 17, 2025

This is known but you can safely ignore it. Next.js emits this warning because the Sentry SDK defines a webpack callback field and when you run with turbopack Next.js warns you in case it is critical for your app to run the webpack callback.

@lforst
Copy link
Member

lforst commented Apr 17, 2025

We can potentially fix this in the future when we only support Next.js versions that set the process.env.TURBOPACK env var when turbopack is used. Right now we need to unconditionally add the webpack callback because we cannot reliably detect turbopack due to old versions.

Maybe we can also add some flag to the SDK that will skip over adding this field.

@mydea mydea added the Improvement label May 7, 2025 — with Linear
@mydea mydea removed the Bug label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants