Closed markus-gx closed 1 year ago
Seems the Demo application breaks too: https://github.com/nuxt-modules/supabase/tree/main/demo
I've come across the identical issue, where both form validation and HMR are failing to function correctly.
I was able to fix this by updating the nuxt.config.ts and installing axios
vite: {
optimizeDeps: {
esbuildOptions: {
define: {
global: "globalThis",
},
},
},
resolve: {
alias: {
'@supabase/node-fetch': 'axios',
},
},
},
I was able to fix this by updating the nuxt.config.ts and installing axios
vite: { optimizeDeps: { esbuildOptions: { define: { global: "globalThis", }, }, }, resolve: { alias: { '@supabase/node-fetch': 'axios', }, }, },
replaced axios with isomorphic-fetch
and works like a charm. THANK YOU.
I was able to fix this by updating the nuxt.config.ts and installing axios
vite: { optimizeDeps: { esbuildOptions: { define: { global: "globalThis", }, }, }, resolve: { alias: { '@supabase/node-fetch': 'axios', }, }, },
actually just this seems to be enough. The problem is in @supabase/node-fetch library
vite: {
resolve: {
alias: {
'@supabase/node-fetch': 'isomorphic-fetch',
},
},
},
It works ✨. Thank you @xkabr00 and @markus-gx .
Seems the Demo application breaks too: https://github.com/nuxt-modules/supabase/tree/main/demo
Thank you 🔥
Version
@nuxtjs/supabase: v1.0.2 nuxt: v3.6.5
Error
After installing Nuxt/supabase, the hot module reload breaks and in the dev console the following error appears:
Step to Reproduce
npx nuxi create <project-name>
yarn add -D @nuxtjs/supabase