Closed Stublic closed 4 months ago
if (user && user.id) {
const { error } = await supabase
.from('users')
.update({ full_name: newName })
.eq('id', user.id); // Now guaranteed to be a string
if (error) {
console.log(error);
}
} else {
console.log("User or user ID is undefined");
}
revalidatePath('/account');
};
I did this, no idea if it works since when I try to deploy it some other error happens, so confusing
That just returns Type error: 'user' is possibly 'undefined'.
for me.
I have tried commenting out the entire .eq('id', user?.id);
line and it throws a similar error when building:
Temp workaround:
.eq('id', parseInt(user?.id || '0'));
Sooo many typescript errors..
Once you fix that one it's on to the next.
And then the next... And the next...
Experiencing the the user? overload issue as well
So what's happening is Stripe made a breaking change and the template could use some love and a fresh update.
ahh that makes sense.. It was working in some capacity in local dev but when redeploying I was experiencing this issue.
I think its time to go into the docs on both supabase and stripe to really figure out how to solve this once and for all..
On Mon, Feb 5, 2024 at 2:25 PM Guy Lepage @.***> wrote:
So what's happening is Stripe made a breaking change and the template could use some love and a fresh update.
— Reply to this email directly, view it on GitHub https://github.com/vercel/nextjs-subscription-payments/issues/288#issuecomment-1928276891, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJ6E5RGY3HNYMLHKLM5TVDYSFL4DAVCNFSM6AAAAABCKYL4F2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRYGI3TMOBZGE . You are receiving this because you commented.Message ID: @.***>
-- Waving [image: 👋]🏻 from Laguna,
Nick Achee | Digital Marketer web: www.nickachee.com cell: 949.320.3818
Yeah. @Nick-Achee I just created a new issue. This tutorial is going to require quite a bit of an overhaul. Not sure anyone is down for that at Vercel.
haha yes it has always been a bit buggy even more so before the app router
On Mon, Feb 5, 2024 at 2:33 PM Guy Lepage @.***> wrote:
Yeah. @Nick-Achee https://github.com/Nick-Achee I just created a new issue. This tutorial is going to require quite a bit of an overhaul. Not sure anyone is down for that at Vercel.
— Reply to this email directly, view it on GitHub https://github.com/vercel/nextjs-subscription-payments/issues/288#issuecomment-1928338659, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJ6E5RK73WKANAAEKCPONLYSFM4FAVCNFSM6AAAAABCKYL4F2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRYGMZTQNRVHE . You are receiving this because you were mentioned.Message ID: @.***>
-- Waving [image: 👋]🏻 from Laguna,
Nick Achee | Digital Marketer web: www.nickachee.com cell: 949.320.3818
Unable to deploy on Vercel due to this error, anybody had a similar issue?