Next.js wizard creates untyped Pages Router files that fail strict type checking
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- next.js, typescript
- 領域
- tooling
調査の方向性
src/nextjs/templates.ts を開き、getSentryDefaultUnderscoreErrorPage と getSentryExamplePagesDirApiRoute を読んでください。この2つは、型のない props、contextData、_req、res のパラメーターを出力するジェネレーターです。TypeScript テンプレートのバリアントにのみ TypeScript のパラメーター型を追加し、#1014 の要件どおり JavaScript の出力は型なしのままにしてください。その後、既存の nextjs テンプレートのテストを実行し、strict な TS の pages プロジェクトにファイルを生成して、next build が型チェックを行うことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Environment
@sentry/wizard master (b262ed0, 9.1.0 plus one commit), Next.js integration, Next.js 16.4.6, TypeScript 5 with strict: true. Reproduced with the wizard's templates directly, not a full wizard run.
Steps to Reproduce
- Have a TypeScript Next.js project with a
pagesdirectory and no custom_errorpage. - Run
npx @sentry/wizard -i nextjsand create the example page. - Run
next build.
Expected Result
The build passes.
Actual Result
The generated files contain untyped parameters and the type check fails:
pages/_error.tsx(4,31): error TS7006: Parameter 'props' implicitly has an 'any' type.
pages/_error.tsx(8,47): error TS7006: Parameter 'contextData' implicitly has an 'any' type.
pages/api/sentry-example-api.ts(11,33): error TS7006: Parameter '_req' implicitly has an 'any' type.
pages/api/sentry-example-api.ts(11,39): error TS7006: Parameter 'res' implicitly has an 'any' type.
Failed to type check.
See getSentryDefaultUnderscoreErrorPage and getSentryExamplePagesDirApiRoute in src/nextjs/templates.ts. The JavaScript variants need to stay untyped (see #1014).
- 主要言語
- TypeScript
- スター
- 297
- フォーク
- 88
- 平均マージ
- 5時間 29分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-wizard のほかの issue
-
bug Next.js
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
getsentry/sentry-wizard#1397 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
React Router Framework
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
getsentry/sentry-wizard#1392 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
getsentry/sentry-wizard#1391 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Cocoa Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
getsentry/sentry-wizard#989 ·
メンテナーはふだん 1 日以内に返信
-
bug Errors
難易度 4/5 3〜5日 初心者へのやさしさ 40/100
getsentry/sentry-wizard#1399 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/sentry-wizard の issue をすべて見る
似ている issue
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10対応中かも @goranai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Inbox permission: an allow sent with `updatedInput` is ignored by Claude Code on its own safety checks対応中かも @Raj1v が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
backnotprop/plannotator#4046 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
traPtitech/knoQ_R-UI#290 ·
メンテナーはふだん 24 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
farion1231/cc-switch#9981 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
account bug course exam iris lecture
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信