Typescript error on deployment
Been trying to get this tutorial to work:- https://supabase.com/docs/guides/with-nextjs
Able to deploy on dev but not promote to production on Vercel, which I believe due to a TS error on this block of code:
with this error,
Property 'subscription' does not exist on type '{ data: { subscription: Subscription; }; }'.",
This can be found under Launch.js
here https://supabase.com/docs/guides/with-nextjs#launchQuickstart: Next.js | Supabase
Learn how to use Supabase in your Next App.
1 Reply
Should it be
const { data: { subscription } } = supabase.auth.onAuthStateChange
based on the type error?
Or const { data: subscription } = supabase.auth.onAuthStateChange
, seen this in other examples