TS6059 error while building project in monorepo setting
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript, webpack
- 領域
- build-system, tooling
調査の方向性
Clone the linked todos reproduction and compare the development and build paths, focusing on apps/extension/webpack.common.mjs around the ts-loader configuration and the extension tsconfig.json. Run the documented prune, install, dev, and build commands to isolate why TS6059 appears only during the build. Done means explaining and correcting the build-time path-resolution failure without breaking development mode.
索引モデルが issue の本文から書いたものです。
説明
Problem
I have a browser extension project which depends on various packages within monorepo.
After updating to typescript 6 it doesn't build anymore due to resulting in errors like this:
ERROR in {package_module_path}
link-overwatch:build: [tsl] ERROR in {module_path}
link-overwatch:build: TS6059: File {module_path} is not under 'rootDir' {extension_project_path}/src'. 'rootDir' is expected to contain all source files.
link-overwatch:build: The file is in the program because:
link-overwatch:build: Imported via {another_module_path} from file {module_path}
link-overwatch:build: Root file specified for compilation
However it only triggers like this when building, during development it works just fine.
Reproduction
Install project
git clone https://github.com/GabenGar/todos
cd todos
# have to invoke prune with `npx` because it's called prior deps installation
# https://turborepo.dev/docs/reference/prune
npx turbo prune link-overwatch
cd out
npm ci
Run npm run dev-extension to start development mode, which will open a new firefox profile instance (so firefox is required). Possibly restart several times, since I haven't found the solution for starting web-ext in parallel but only after webpack produces output. But the point is it will work just fine and build on webpack side without path resolution errors.
Now run npm run build-extension and get bombarded with errors.
It couldn't be due webpack misconfiguration, because ts-loader gets used in both environments. There is also nothing inherently wrong with @repo/ui workspace structure, since its code is consumed by two other frontend projects, one isn't even using webpack. Nor I don't see any anomalies in tsconfig.json. So I assume the problem is ts-loader behaviour specifically with typescript 6+.
- 主要言語
- TypeScript
- スター
- 3.5k
- フォーク
- 439
- 平均マージ
- 8時間 6分
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TypeStrong/ts-loader のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
TypeStrong/ts-loader#1722 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
rspack compatibility対応中かも @onigoetz が 191 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
TypeStrong/ts-loader#1694 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
TypeStrong/ts-loader#1675 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
TypeStrong/ts-loader#1671 · コメント 12 件 · リアクション 11 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
TypeStrong/ts-loader#1660 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
TypeStrong/ts-loader の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
danielmiessler/LifeOS#3028 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
iOS: last line of a long UITextView text is sometimes not drawn (frame a fraction of a point short)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
Koenkk/zigbee2mqtt#33855 ·
メンテナーはふだん 1 日以内に返信