Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#1,657 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
124
フォーク
14
平均マージ
21時間 48分
マージ済み PR(30日)
64

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/cli のほかの issue

getsentry/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。