Skip to content

@sentry/nextjs failing when exporting static version of nextjs application #6638

@Antoine-Mace

Description

@Antoine-Mace

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/nextjs

SDK Version

7.28.1

Framework Version

NextJs v11.1.4

Link to Sentry event

No response

Steps to Reproduce

We want to try out the new Sentry replay feature, but we were using Sentry v6.13.3 so we try to upgrade to v7.28.1

  1. install @sentry/nextjs v7.28.1
  2. run a next js production build NODE_ENV=production next build
  3. run a next js export to get the static file version of the app NODE_ENV=production next export

Expected Result

Export build should not fail.

Actual Result

Next export command is failing.

Based on the below screenshot we can see that the export build failed, due to TypeError: Cannot read property '__sentry_original__' of undefined this seems to happen on all route.

Is there some configuration to be added to avoid those error?

Screenshot 2023-01-03 at 12 01 55

Screenshot 2023-01-03 at 12 02 14

Thank you for your help,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions