-
Notifications
You must be signed in to change notification settings - Fork 148
Nuxt3 api/me route cannot resolve import from '#supabase/server' #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ASoldo I'm getting the same thing. I think it's something to do with how VSCode is resolving the generated types in My hack is a little more tolerable than declare module "#supabase/server" {
const serverSupabaseClient: typeof import("../node_modules/@nuxtjs/supabase/dist/runtime/server/services").serverSupabaseClient;
const serverSupabaseServiceRole: typeof import("../node_modules/@nuxtjs/supabase/dist/runtime/server/services").serverSupabaseServiceRole;
const serverSupabaseUser: typeof import("../node_modules/@nuxtjs/supabase/dist/runtime/server/services").serverSupabaseUser;
} |
I also get the same issue. |
Maybe it will be helpfull to someone. I also had this problem and it appears that the import path could not be resolved. What personally helped to me:
import { serverSupabaseUser } from '#supabase/server'
After these 2 steps my app worked again. |
I am facing the same issue. Have someone solved it yet? |
I managed to solve it with a tsconfig.json file like this: |
None of the solutions worked for me but I found this related issue #471 and implemented the proposed solution which solved the issue for me. You can add this to your
|
You beat me to posting this! The correct file to edit is Just a heads up for everyone who tries this though, this is a temporary fix. Nuxt will automatically overwrite this file every now and then, which will undo these changes, and you'll either have to re-edit the file or live with that red squiggly line. Hopefully a permanent fix is implemented soon :) |
In my case, somehow the Adding it back solved the issue for me. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
Hi, I'm having typescript error saying that cannot find module in "#supabase/server" even tho everything works fine, it's just that error. Tried in VS Code, Nvim and got same error. For now i use // @ts-ignore for that part but it's just so I can find fix for it. Anybody know how to fix this?

Version
@nuxtjs/supabase: v0.3.7
nuxt: v3.5.3
Steps to reproduce
Create server/api/me.ts and try to import serverSupabaseUser without typescript error
What is Expected?
Typescript should be able to import and show types for serverSupabaseUser when importing.
What is actually happening?
Typescript is throwing error that it cannot find module or declaration in #supabase/server as shown in image above.
The text was updated successfully, but these errors were encountered: