Skip to content

Next.js: Sourcemaps are being generated for edge despite no sentry.edge.config.ts #15849

Closed as not planned
@vernak2539

Description

@vernak2539

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

9.5.0

Framework Version

Next.js 15.2.3, React 18.3.1

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

  1. Install sentry per docs https://docs.sentry.io/platforms/javascript/guides/nextjs/
  2. Remove sentry.edge.config.ts
  3. Remove inclusion of edge config in instrumentation hook
  4. Build

Expected Result

I'd expect that when running next build (using withSentryConfig) that sourcemaps are not created and uploaded for the edge environment. Maybe there's another way to disable the edge environment.

Actual Result

Edge sourcemaps are created and uploaded to sentry

    ~/f236c457-1649-4a13-a47d-db04665af002-54.js.map (debug id f236c457-1649-4a13-a47d-db04665af002)
    ~/f362255e-7995-4ef1-83b3-be17d1b5d82b-141.js.map (debug id f362255e-7995-4ef1-83b3-be17d1b5d82b)
    ~/f4b1832c-325d-4394-8136-de9ac8c7e0a6-157.js.map (debug id f4b1832c-325d-4394-8136-de9ac8c7e0a6)
    ~/f5350f9f-d95c-494a-a627-099755734877-75.js.map (debug id f5350f9f-d95c-494a-a627-099755734877)
    ~/f5edacc5-2870-4ef1-9ffe-8b5f553c8345-167.js.map (debug id f5edacc5-2870-4ef1-9ffe-8b5f553c8345)
    ~/f7d1b362-4009-414b-8e09-50256ba4de49-104.js.map (debug id f7d1b362-4009-414b-8e09-50256ba4de49)
    ~/f809e5df-99ad-4650-9b55-3f5dc3c804a3-34.js.map (debug id f809e5df-99ad-4650-9b55-3f5dc3c804a3)
    ~/f8c35539-8925-42be-862d-7519ab3a4774-173.js.map (debug id f8c35539-8925-42be-862d-7519ab3a4774)
    ~/fbd06441-3f30-4928-bd0f-3254d3cbd57f-132.js.map (debug id fbd06441-3f30-4928-bd0f-3254d3cbd57f)
[@sentry/nextjs - Edge] Info: Successfully uploaded source maps to Sentry
  WARN    2025-03-27 10:53:18.713092868 +00:00 The --use-artifact-bundle option and the SENTRY_FORCE_ARTIFACT_BUNDLES environment variable are both deprecated, and both will be removed in the next major version.
> Found 491 files
> Analyzing 491 sources
> Analyzing completed in 0.07s
> Adding source map references
> Bundling completed in 1.436s
> Bundled 491 files for upload
> Bundle ID: 600a29ee-2808-51d9-b155-2552c9e62ae9
> Optimizing completed in 0.038s
> Uploading completed in 0.966s
> Uploaded files to Sentry
> Processing completed in 0.199s
> File upload complete (processing pending on server)
> Organization: *********
> Project: ******************
> Release: production-2209f616cd37095828a751d1b398cb0b995ddd03
> Dist: None
> Upload type: artifact bundle

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nextjsIssues related to the Sentry Nextjs SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions