supabase icon indicating copy to clipboard operation
supabase copied to clipboard

when i update v1.0.1, deployment enviroment dosen't work

Open yeonjulee1005 opened this issue 2 years ago • 8 comments

i update @nuxrt/supabase 1.0.1

it works fine in dev enviroment.

but, when it deploy, page dosen't work like this

image image

also, i check nuxt preview

terminal says, like this

[nuxt] [request error] [unhandled] [500] Cannot access 'NuxtPluginIndicator' before initialization
  at defineNuxtPlugin (./server/chunks/app/server.mjs:51962:19)
  at ./server/chunks/app/server.mjs:1984:52
  at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
image

first, i rollback this version.

how should i do? please help me~~

yeonjulee1005 avatar Aug 04 '23 08:08 yeonjulee1005

@yeonjulee1005 Just to confirm, have you read the release notes and made the required changes?

onurusluca avatar Aug 04 '23 15:08 onurusluca

@onurusluca thank you for your kind reply :)

sure! i've done below required changed.

image

i set nuxt.config.ts like this.

image


and also set promise in serverSupabaseClient like this (this is some example)

/server/api/user image


and i changed useSupabaseAuthClient to useSupabaseClient

but, it dosen't work in deployment environment (it works fine in dev environment)

image image image

yeonjulee1005 avatar Aug 04 '23 16:08 yeonjulee1005

@yeonjulee1005 The fact that it works in dev but not deployment gives us a pretty good starting point. First, do a local build and see if that works there. If that works, it is probably a environment variables problem or a hosting one. Where are you hosting?

What is Fo btw? Is that your custom code? Where do you use it?

Also just in case do a nuxt and npm cache clean.

onurusluca avatar Aug 04 '23 17:08 onurusluca

@onurusluca

i hosting in vercel but, in vercel enviroment are like this image

but, it works fine @nuxt/supabase 0.3.8 when i upgrade @nuxt/supabase 1.0.1 and @nuxt/supabase 1.0.2 it occur.


actually, i try nuxt build -> nuxt preview in local. But as mentioned above, terminal output below error.

[nuxt] [request error] [unhandled] [500] Cannot access 'NuxtPluginIndicator' before initialization
  at defineNuxtPlugin (./server/chunks/app/server.mjs:51962:19)
  at ./server/chunks/app/server.mjs:1984:52
  at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
image

i guess Fo is NuxtPluginIndicator 👀


and i try yarn cleanup and yarn cahce clean, and deleted reinstall .nuxt .node_modules , yarn intall it dosen't work.. 😢

yeonjulee1005 avatar Aug 05 '23 00:08 yeonjulee1005

@yeonjulee1005 Hmm, then it must be a specific problem. Can you provide a reproduction or is it possible to see your code?

onurusluca avatar Aug 05 '23 16:08 onurusluca

@onurusluca sure! my project is currently open source below, you can show my source code:)

you can show normal in master branch (this branch use @nuxt/supabase v0.3.8) dooramgi master deployment site Dooramgi master source

you cah show error in stage branch (this branch use @nuxt/supabase v1.0.2) dooramgi stage deployment site Dooramgi stage source

yeonjulee1005 avatar Aug 05 '23 23:08 yeonjulee1005

@yeonjulee1005 Thanks for sharing, nice code base!

Because it says defineNuxtPlugin, maybe try to comment out the plugins one by one and see if it works?

I can't really test it because I need to have a supabase backend to use it. Sorry, I can't really find a problem here.

If possible a reproduction is welcome.

Also this may be a nuxt supabase lib internal problem. Try tagging the maintainers but I am sure they will want a reproduction.

To determine the cause of the issue, can you provide a minimal minimal reproduction using one of the starter templates?

👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz 👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox

onurusluca avatar Aug 06 '23 03:08 onurusluca

@onurusluca
thank you for helping me :)

yeonjulee1005 avatar Aug 06 '23 08:08 yeonjulee1005