Skip to content

Sentry doesn't work on Next 13.5 #9092

@RilDev

Description

@RilDev

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

7.70.0

Framework Version

Next 13.5.2

Link to Sentry event

No response

SDK Setup

// This file configures the initialization of Sentry on the client.
// The config you add here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";

Sentry.init({
  dsn: DNS_URL,

  // Adjust this value in production, or use tracesSampler for greater control
  tracesSampleRate: 1,

  // Setting this option to true will print useful information to the console while you're setting up Sentry.
  debug: false,

  replaysOnErrorSampleRate: 1.0,

  // This sets the sample rate to be 10%. You may want this to be 100% while
  // in development and sample at a lower rate in production
  replaysSessionSampleRate: 0.1,

  // You can remove this option if you're not planning to use the Sentry Session Replay feature:
  integrations: [
    new Sentry.Replay({
      // Additional Replay configuration goes in here, for example:
      maskAllText: true,
      blockAllMedia: true,
    }),
  ],
});

Steps to Reproduce

  1. update project from Next 13.4 to 13.5 with yarn add next@latest react@latest react-dom@latest eslint-config-next@latest
  2. remove and reinstall Sentry with npx @sentry/wizard@latest -i nextjs
  3. run dev server with yarn dev

Expected Result

When navigating to localhost:3000, it displays a page.

Actual Result

When navigating to localhost:3000, it throws an error:

⨯ ./app/layout.tsx
Module not found: Can't resolve 'next/dist/client/components/request-async-storage'

image

I check in my node_modules directory and indeed request-async-storage is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nextjsIssues related to the Sentry Nextjs SDK

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions