nuxt-modules / supabase

Supabase module for Nuxt.
https://supabase.nuxtjs.org
MIT License
699 stars 126 forks source link

nuxt.config.ts type bug #337

Closed KenZync closed 1 month ago

KenZync commented 7 months ago

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 commented 7 months ago

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

"compilerOptions": {
"moduleResolution": "node",
}
selemondev commented 5 months ago

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.

pascalwengerter commented 1 month ago

@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 commented 1 month ago

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)