- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.7k
Closed as not planned
Closed as not planned
Copy link
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
7.86.0
Framework Version
Next.js 14.0.4
Link to Sentry event
No response
SDK Setup
import { CaptureConsole as CaptureConsoleIntegration } from '@sentry/integrations'
import * as Sentry from '@sentry/nextjs'
Sentry.init({
  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
  environment: process.env.NEXT_PUBLIC_SENTRY_ENV || process.env.NEXT_PUBLIC_APP_ENV,
  tracesSampleRate: Number(process.env.NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE) || 0,
  integrations: [
    new CaptureConsoleIntegration({
      // array of methods that should be captured
      // defaults to ['log', 'info', 'warn', 'error', 'debug', 'assert']
      levels: [ 'error' ],
    }),
    new Sentry.Replay({
      maskAllText: false,
      blockAllMedia: false,
    }),
  ],
  replaysSessionSampleRate: 0,
  replaysOnErrorSampleRate: 1.0, // overrides replaysSessionSampleRate when an error occurs
})Steps to Reproduce
- pnpm build
Expected Result
no errors
Actual Result
 ⚠ Compiled with warnings
./src/lib/sentry/index.ts
Attempted import error: 'Replay' is not exported from '@sentry/nextjs' (imported as 'Sentry').
Import trace for requested module:
./src/lib/sentry/index.ts
./src/app/global-error.tsx
./src/lib/sentry/index.ts
Attempted import error: 'Replay' is not exported from '@sentry/nextjs' (imported as 'Sentry').
Import trace for requested module:
./src/lib/sentry/index.ts
./src/app/layout.tsx
./src/lib/sentry/index.ts
Attempted import error: 'Replay' is not exported from '@sentry/nextjs' (imported as 'Sentry').
Import trace for requested module:
./src/lib/sentry/index.ts
./src/app/api/reset-password/route.ts
Metadata
Metadata
Assignees
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
Projects
Status
Waiting for: Product Owner