Module build results in "error TS2307: Cannot find module or its corresponding type declarations."
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- nuxt, typescript
- 領域
- build-system
調査の方向性
リンクされた再現手順から始め、報告された環境で npm run prepack を実行します。module.ts、src/runtime/types/index.ts、および参照されている runtime/types と components/MyDiv.vue のパスを調査し、Vue モジュールを解決できない理由を追跡します。runtime types をエクスポートしながら、モジュールが TS2307 なしでビルドできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Environment
- Operating System: Windows_NT
- Node Version: v20.10.0
- Nuxt Version: 3.15.4
- CLI Version: 3.21.1
- Nitro Version: 2.10.4
- Package Manager: [email protected]
- Builder: -
- User Config: -
- Runtime Modules: -
- Build Modules: -
Reproduction
https://github.com/prof-schnitzel/nuxt-ts-bug-module/tree/main
Describe the bug
In my module.ts I have added the line export type * from './runtime/types' so that my nuxt module exports types that can be used in a consumer app. In the types file I only have this line: export * from '../components/MyDiv.vue'. But when running npm run prepack I get the error src/runtime/types/index.ts(1,15): error TS2307: Cannot find module '../components/MyDiv.vue' or its corresponding type declarations. Why? This seems to be a bug to me.
Additional context
No response
Logs
- 主要言語
- TypeScript
- スター
- 277
- フォーク
- 36
- 平均マージ
- 4日 19時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nuxt/module-builder のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
nuxt/module-builder#801 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
nuxt/module-builder#764 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
nuxt/module-builder#754 ·
-
Conflict between folder structure in readme (src/runtime) and TypeScript config (src/module/runtime)対応中かも @dword-design が 137 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
nuxt/module-builder#749 ·
-
Tsdown/obuild migration再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
nuxt/module-builder#726 · コメント 1 件 · リアクション 1 件 ·
nuxt/module-builder の issue をすべて見る
似ている issue
-
Unsampled pageload span is profiled when profileLifecycle is 'trace' (browser UI profiling)対応中かも @Jxxunnn が今日担当しました。 オープンBrowser Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
getsentry/sentry-javascript#25497 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
redhat-developer/rhdh-plugin-export-overlays#4438 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
resource: destroying a resource calls AbortController.abort() without a reason, creating an AbortError with a stack trace each time対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea: core
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
angular/angular#71422 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
facebook/docusaurus#12739 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信