Skip to content

fix: typecheck fails on imports which exist for nuxt and nitro #24087

@dargmuesli

Description

@dargmuesli

Run npm exec nuxi typecheck here: https://stackblitz.com/edit/github-dnls7g?file=server%2Futils%2Futil.ts

You'll see an error because a nuxt util has the same name as a server util but a different signature. I'd expect no error to be thrown as no error is shown to me in both files which make use of their respective utils.


I see that .nuxt/tsconfig.json does not exclude the server directory and that .nuxt/tsconfig.server.json does include ../**/* by default. Is that meant to be this way? I'd expect tsconfig.json to exclude server and tsconfig.server.json to only include server and not the rest.

Alternatively, there should be an error shown in vscode matching the one given by the typecheck, in case the typecheck error is correct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions