Skip to content

nitro auto imports in server/auth.config.ts are not detected by typecheck command #309

@jd-solanki

Description

@jd-solanki

Hi 👋🏻

I have nuxt layers based architecture and I have few utils in server dir in another layer which allows me to download image from given URL. I want to use it in databaseHooks.user.before to download and store image in my own storage from third-party providers like google & github as that is best practices.

I noticed when I use these utils via auto import nr typecheck command fail with can't load auth config. However, I noticed auto-import do work at runtime and works correctly, it's just typecheck command which throws error.

(another finding is #server alias also fails when import statement don't use relative path)


In my actual project I was getting different error as shown below and when I reproduced issue I got error related to auto-import but in different manner so not sure if both will be resolved by same solution or not.

In repro I get error like following:
Image

However, In my project I get error like:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions