supabase icon indicating copy to clipboard operation
supabase copied to clipboard

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

Open skizer opened this issue 1 year ago • 0 comments

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 avatar Jun 03 '23 20:06 skizer