Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,657 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Locate where sentry init renders the config templates for instrumentation-client.ts, sentry.server.config.ts and sentry.edge.config.ts in this TypeScript CLI repo, and how the installed @sentry/* version is (or is not) read during init. Gate emission of enableLogs: true on the resolved SDK major version being ≤ 10, keeping the option for older SDKs. Done means tsc --noEmit passes on a Next.js project with @sentry/nextjs 11 after init, and the generated configs for a v10 project still contain enableLogs — check for existing snapshot/unit tests around init config generation to extend.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
123
Fork
14
Merge medio
21h 48m
PR unite (30g)
64

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/cli

Tutte le issue di getsentry/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.