Published declarations import types from connect, @babel/core and @babel/traverse, whose @types packages are not dependencies
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, node.js, typescript
- 領域
- tooling
調査の方向性
Start with the declaration imports in packages/metro-config/src/types.js and packages/metro/src/Server.js, then inspect the package manifests for metro-config and metro and the other declaration files named in the report. Reproduce the failure with the linked project’s npm run typecheck using skipLibCheck: false; done means the published packages type-check without the missing-declaration errors.
索引モデルが issue の本文から書いたものです。
説明
Reproduction: https://github.com/YevheniiKotyrlo/metro-connect-types
A TypeScript project that depends on metro-config and type-checks it with skipLibCheck: false fails on metro's own declarations: they import types from connect, @babel/core and @babel/traverse, and no metro package depends on @types/connect, @types/babel__core or @types/babel__traverse. metro-config lists @types/connect under devDependencies only, and metro not at all.
Steps (metro 0.87.2, metro-config 0.87.2, TypeScript 6.0.3, npm 12, Node 26, Windows 11 and Ubuntu 22.04 under WSL):
npm installnpm run typecheck, which runstsc -p .over anindex.tsholdingimport type { ConfigT } from 'metro-config';, withstrict,"skipLibCheck": falseand"types": ["node"].
Expected: no error.
Seen:
node_modules/metro-babel-transformer/src/index.d.ts(18,38): error TS7016: Could not find a declaration file for module '@babel/core'. 'node_modules/@babel/core/lib/index.js' implicitly has an 'any' type.
node_modules/metro-babel-transformer/src/index.d.ts(21,36): error TS7016: Could not find a declaration file for module '@babel/core'. 'node_modules/@babel/core/lib/index.js' implicitly has an 'any' type.
node_modules/metro-config/src/types.d.ts(18,43): error TS7016: Could not find a declaration file for module 'connect'. 'node_modules/connect/index.js' implicitly has an 'any' type.
node_modules/metro-source-map/src/generateFunctionMap.d.ts(19,30): error TS7016: Could not find a declaration file for module '@babel/core'. 'node_modules/@babel/core/lib/index.js' implicitly has an 'any' type.
node_modules/metro/src/ModuleGraph/worker/collectDependencies.d.ts(18,29): error TS7016: Could not find a declaration file for module '@babel/traverse'. 'node_modules/@babel/traverse/lib/index.js' implicitly has an 'any' type.
node_modules/metro/src/Server.d.ts(26,36): error TS7016: Could not find a declaration file for module 'connect'. 'node_modules/connect/index.js' implicitly has an 'any' type.
On main (a87d864565ae34826ab2425a1f06341c16a2c515) the same holds: I ran yarn build-ts-defs and node scripts/build.js under Ubuntu, packed metro-config and metro after prepare-release, installed both packs in the same project and ran the same check, which prints the same six errors. packages/metro-config/src/types.js imports HandleFunction and Server from connect, and packages/metro/src/Server.js imports IncomingMessage from it.
An app that happens to install those @types packages, as many React Native apps do through other dependencies, never sees this; a project that depends on metro alone does.
- 主要言語
- JavaScript
- スター
- 5.7k
- フォーク
- 711
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 66
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react/metro のほかの issue
-
[metro-file-map] An error a watcher backend reports ends the server, since nothing listens for itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
赞~オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
DeanChensj/jiangshan-map#221 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 13 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
AtlasOfLivingAustralia/species-lists#874 ·
メンテナーはふだん 1 日以内に返信
-
Slack: DM thread replies sent with "Also send to..." never reach the agent対応中かも @roboeve が今日担当しました。 オープンbug channel:slack p2
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信