microsoft / microsoft/TypeScript
Use explicit extensions in TypeScript's package.json for Node ES resolution compatibility
オープン
まだ誰も着手していません。
In Discussion
Suggestion
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Bug Report
🕗 Version & Regression Information
Versions:
- 4.3.2
- 4.1.2
- This is a crash
- This is the behavior in every version I tried
⏯ Playground Link
💻 Code
Run tsc (yarn tsc, yarn exec tsc, npx tsc, ./node_modules/.bin/tsc) with nodejs flag --experimental-specifier-resolution=node (NODE_OPTIONS="--experimental-specifier-resolution=node" tsc)
🙁 Actual behavior
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module "file:///path/to/project/node_modules/typescript/bin/tsc"
at Loader.getFormat (internal/modules/esm/loader.js:117:13)
at async Loader.getModuleJob (internal/modules/esm/loader.js:242:20)
at async Loader.import (internal/modules/esm/loader.js:176:17)
at async Object.loadESM (internal/process/esm_loader.js:68:5) {
code: 'ERR_INVALID_MODULE_SPECIFIER'
}
🙂 Expected behavior
Build without errors
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず TypeScript の package.json と、node_modules/typescript/bin/tsc に示されている tsc のエントリーポイントを調べ、その後 Node の --experimental-specifier-resolution=node フラグを使ってクラッシュを再現します。提供された最小例で、報告されている ERR_INVALID_MODULE_SPECIFIER エラーなしに tsc コマンドでビルドできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- node.js, typescript
- 領域
- build-system, cli
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100