Skip to content

[@sentry/nextjs]: project option in withSentryConfig typed as string but bundler plugin accepts `string | string[] #21066

Closed

Description

@delorge

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

10.53.1

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

Config's type definition declares project?: string, but the underlying @sentry/bundler-plugin-core types project as string | string[]
(source).

Build plugin option forwards the value verbatim to the bundler plugin - meaning the runtime already accepts arrays, but the TypeScript type rejects them at compile time. And it also breaks discoverability for agents.

Steps to Reproduce

withSentryConfig(nextConfig, {
  project: ['proj-a', 'proj-b'],
})

Expected Result

No TypeScript error — project accepts string | string[].

Actual Result

Type 'string[]' is not assignable to type 'string | undefined'.

Additional Context

No response

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 20, 2026
  2. linear-code commented on May 20, 2026

    @linear-code
  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 21, 2026
  4. added a commit that references this issue on May 21, 2026
    a8420ef
  5. github-actions commented on May 26, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #21067, which was included in the 10.54.0 release.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions