nextjs-16-sentry-turbopack-integration

Installation
SKILL.md

Next.js 16 + Sentry + Turbopack Integration

Problem

Integrating Sentry into a Next.js 16 project using Turbopack causes multiple issues:

  1. Math.random() errors during SSR from Sentry's OpenTelemetry integration
  2. Deprecation warnings for webpack-specific Sentry options
  3. TypeScript type errors from duplicate Next.js installations
  4. Performance tracing conflicts with Next.js 16's prerendering

Context / Trigger Conditions

Exact error messages you'll encounter:

Route "/[locale]/page" used `Math.random()` before accessing uncached data.
    at RandomIdGenerator.generateId [as generateSpanId]
    (@opentelemetry/sdk-trace-base/src/platform/node/RandomIdGenerator.ts:42:41)
Installs
1
GitHub Stars
1
First Seen
Mar 4, 2026
nextjs-16-sentry-turbopack-integration — hankanman/claude-config