Skip to content

VSCode - Cannot find module '#supabase/server' or its corresponding type declarations #191

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

Open
skizer opened this issue Jun 3, 2023 · 2 comments
Labels
bug Something isn't working Stale

Comments

@skizer
Copy link

skizer commented Jun 3, 2023

Version

@nuxtjs/supabase: 0.3.6
nuxt: 3.5.2
VSC: 1.79.0 - Insiders

Current Behavior

When attempting to import the module #supabase/server in my nuxt3 project server-side, I encounter the following error message in VSCode:
Cannot find module '#supabase/server' or its corresponding type declarations.

Everything runs fine, except that VSCode screams at me that it misses them and therefore no type hints/intellisense is available.

Steps to Reproduce:

  1. Create a fresh Nuxt3 project & install @nuxtjs/supabase
  2. Create e.g a file at /server/api/test.ts
  3. Try to import e.g import { serverSupabaseClient } from '#supabase/server'

Additional Context:

  1. supabase.d.ts gets created at .nuxt/types/supabase.d.ts
  2. works temporary if you add it under includes at .nuxt/tsconfig.server.json - until you restart/rebuild ofc.
@skizer skizer added the bug Something isn't working label Jun 3, 2023
@putrafajarh
Copy link

Hi i got this problem, after enable

future: {
    compatibilityVersion: 4,
},

in nuxt.config.ts

Copy link

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.

@github-actions github-actions bot added the Stale label May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants