supabase icon indicating copy to clipboard operation
supabase copied to clipboard

nuxt.config.ts type bug

Open KenZync opened this issue 1 year ago • 2 comments

Version

@nuxtjs/supabase: 1.1.7 nuxt: 3.11.1

Reproduction Link

Steps to reproduce

-init new nuxt project -install supabase -add config

What is Expected?

should be like this, no error , this is old version nuxt 3.8.2, supabase 1.1.4 image

What is actually happening?

it is throwing error for some reason nuxt.config.ts

export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: [
    '@nuxt/ui',
    '@nuxtjs/supabase'
  ],
  supabase: {
    redirectOptions: {
      login: '/',
      callback: '/confirm'
    }
  },
})

image

KenZync avatar Mar 27 '24 14:03 KenZync

add this into tsconfig.json fix the bug but should it not have to be added?

"compilerOptions": {
"moduleResolution": "node",
}

KenZync avatar Mar 27 '24 14:03 KenZync

Upgrade nuxt and @nuxtjs/supabase to the latest version and everything will work fine without you having to set the "moduleResolution" to "node" in the tsconfig.json file.

selemondev avatar May 19 '24 08:05 selemondev

@KenZync is this still a problem? I think I've come across this, but seems like something that's fixed by running pnpm postinstall (so Nuxt re-creates its types) and potentially re-starting VsCode (since it somethings gets "stuck" on such type errors, at least in my experience)

pascalwengerter avatar Sep 06 '24 09:09 pascalwengerter

I haven't checked new version since I already fixed with my own method. Thank you for your suggestion

@KenZync is this still a problem? I think I've come across this, but seems like something that's fixed by running pnpm postinstall (so Nuxt re-creates its types) and potentially re-starting VsCode (since it somethings gets "stuck" on such type errors, at least in my experience)

KenZync avatar Sep 06 '24 10:09 KenZync