Skip to content

@sentry/nextjs + runtime = "edge" causes .next/app-build-manifest.json not to be populated and builds to break #8062

Description

@nrgnrg

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.51.0

Framework Version

13.4.1

Link to Sentry event

No response

SDK Setup

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

Sentry.init({
  dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN,
  tracesSampleRate: 0.2,
  debug: false,
  replaysOnErrorSampleRate: 1,
  replaysSessionSampleRate: 0.1,
  integrations: [
    new Sentry.BrowserTracing(),
    new Sentry.Replay({
      maskAllText: true,
      blockAllMedia: true,
    }),
  ],
});

Steps to Reproduce

  1. Setup a default template next project using the automatic setup and the app directory https://nextjs.org/docs/getting-started/installation
  2. Used the wizard and set up "@sentry/nextjs" with the defaults for the next.config, client.config, edge.config, server.config

everything looks good at this point, next start works etc...

  1. add export const runtime = "edge"; to the root layout

next start breaks because .next/app-build-manifest.json is now empty.

Removing withSentryConfig and returning the next config to the original default config or removing export const runtime = "edge"; gets the build working again and the manifest correctly populated.

Expected Result

Nothing should change by adding export const runtime = "edge";

Actual Result

// .next/app-build-manifest.json

{
  "pages": {}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions