Skip to content

Typecheck fails when using multiple imports.dirs in Nuxt 4 / monorepo / turbo #34644

@pbartyla-code

Description

@pbartyla-code

Environment

Nuxt project info:

Operating system Linux 6.17.0-19-generic
CPU 13th Gen Intel(R) Core(TM) i7-1355U (12 cores)
Node.js version v22.15.1
nuxt/cli version 3.34.0
Package manager npm@11.1.0
Nuxt version 4.4.2
Nitro version 2.13.1
Builder vite@7.3.1
Config -
Modules -

Reproduction

git clone https://github.com/pbartyla-code/nuxt-imports.git &&
cd nuxt-imports &&
npm install &&
npm run postinstall &&
npm run typecheck

Describe the bug

Type checking breaks when multiple directories are defined in imports.dirs.

When a single directory is provided, everything works correctly.
However, after adding more directories to imports.dirs, type generation and/or type checking fails.

This issue appears after running postinstall (which triggers Nuxt prepare / type generation).

The problem seems to occur only in a Turborepo setup with multiple applications and shared layers (using extends).
In a single standalone Nuxt app, the issue does not appear.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions