You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nuxi typecheck fails to detect h3 exports (maybe more) #1143
I am using nuxt-auth-utils and getting this error:
error TS2724: '"#imports"' has no exported member named 'setUserSession'. Did you mean 'useUserSession'?
Key detail: useUserSession is only exported in #imports generated for frontend. This is my hint that it is not picking up correct #imports file. It is picking up frontend's file wherease it should have been backend one.
any workaround or something? or may I know which exact repo does this issue belong? or is something similar already reported for me to track progress? any direction would be appreciated.
@cernymatej it's not just about h3 exports. It includes all the defined utils, nuxt auth utils, nitro runtime functions and so on...
It would have been great if I could have just used #imports to import all these. But right now, adding typecheck to ci is far more important for me. Plus I can't fully use auto imports since nuxt test utils don't like it.
Activity
amandesai01 commentedon Nov 28, 2025
Actually it is unable to detect imports from a lot more libs
amandesai01 commentedon Nov 28, 2025
I am using
nuxt-auth-utilsand getting this error:Key detail:
useUserSessionis only exported in#importsgenerated for frontend. This is my hint that it is not picking up correct#importsfile. It is picking up frontend's file wherease it should have been backend one.amandesai01 commentedon Dec 4, 2025
any workaround or something? or may I know which exact repo does this issue belong? or is something similar already reported for me to track progress? any direction would be appreciated.
danielroe commentedon Dec 4, 2025
this is an inevitable consequence of nuxt/nuxt#33627 unfortunately.
this won't happen with nitro v3 as it requires explicit imports, and otherwise we would consider going for
#imports/nuxtand#imports/nitrotsconfig.app.jsonchecks types in server endpoints nuxt#33627cernymatej commentedon Dec 25, 2025
Wouldn't explicitly importing from
h3instead of#importsbe an acceptable workaround for projects not using Nitro v3?danielroe commentedon Dec 25, 2025
yes, and that is going to be the solution in nitro v3 as well (via
nitro/h3and we might even considernuxt/h3)amandesai01 commentedon Dec 28, 2025
@cernymatej it's not just about
h3exports. It includes all the defined utils, nuxt auth utils, nitro runtime functions and so on...It would have been great if I could have just used
#importsto import all these. But right now, adding typecheck to ci is far more important for me. Plus I can't fully use auto imports since nuxt test utils don't like it.cernymatej commentedon Dec 28, 2025
Let's track here: nuxt/nuxt#33979
amandesai01 commentedon Dec 28, 2025
I might have misunderstood, but it's not just about endpoint files. All the server files.
I have updated reproduction to accurately depict the issue.
cernymatej commentedon Dec 28, 2025
hmm, interesting. I'll update the issue description. thanks!