TypeScript cannot resolve @nuxt/ui types and component slots in Nuxt workspace monorepo

オープン
#7,389 コメント 1 件 リアクション 3 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript, vite
領域
frontend, tooling

調査の方向性

The report is a TypeScript resolution failure for @nuxt/ui in a monorepo where a Nuxt app extends a shared package that depends on it; the linked reproduction repository is the starting point. Clone it, install dependencies, and run the type check to reproduce the 'Cannot find module' error. Then trace how the extended package's @nuxt/ui types are resolved. Done means the type check passes and the components and slots are typed in the consuming app.

索引モデルが issue の本文から書いたものです。

説明

triage
Environment

Nuxt project info:

Operating system Linux 6.18.54.1-microsoft-standard-WSL2
CPU 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 cores)
Node.js version v24.21.0
nuxt/cli version 3.37.0
Package manager [email protected]
Nuxt version 4.4.8
Nitro version 2.13.6
Builder [email protected]
Config -
Modules -
Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.12.0

Reproduction

https://github.com/fkwww27/nuxt-bug-reproduction

Description

There is a TypeScript error: Cannot find module '@nuxt/ui' or its corresponding type declarations. when @nuxt/ui is installed in a shared package that is extended by a Nuxt application.

The issue occurs in a monorepo setup where the Nuxt application extends a package that has @nuxt/ui installed as a dependency.

This setup worked correctly in previous versions of Nuxt UI, but the TypeScript error started occurring after upgrading to a newer version.

Additional context

No response

Logs

主要言語
TypeScript
スター
7.1k
フォーク
1.2k
平均マージ
1日 2時間
マージ済み PR(30日)
147

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nuxt/ui のほかの issue

nuxt/ui の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。