Skip to content

init: writes enableLogs for @sentry/* v11, which fails typecheck #1657

Description

@sergical

Summary

On a project that resolves @sentry/nextjs 11.x, sentry init (0.45.0) writes enableLogs: true into instrumentation-client.ts, sentry.server.config.ts and sentry.edge.config.ts. SDK 11 removed that option (@sentry/core 11.4.0 Options has no enableLogs; log capture is no longer gated), so tsc fails:

error TS2353: Object literal may only specify known properties, and 'enableLogs' does not exist in type 'BrowserOptions'.

One error per config file. At runtime logs still flow, so the only effect is a broken typecheck — but that blocks CI on any repo with tsc --noEmit in its checks.

Repro

  1. Next.js 16 app, pnpm add @sentry/nextjs@^11.
  2. sentry init, select logs.
  3. pnpm exec tsc --noEmit.

Seen on getsentry/sentry-devex#91.

Expected

Omit enableLogs for SDK ≥ 11, keep it for ≤ 10.

Possibly related: #1382 (logs selected, Logs page still shows onboarding) — different symptom, but both are "init's logs setup does not match the installed SDK".

Created with Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions