vercel / nextjs-subscription-payments

Clone, deploy, and fully customize a SaaS subscription application with Next.js.
https://subscription-payments.vercel.app/
MIT License
5.79k stars 1.19k forks source link

No overload matches this call. ./app/account/page.tsx:47 #288

Closed Stublic closed 4 months ago

Stublic commented 5 months ago

Unable to deploy on Vercel due to this error, anybody had a similar issue?

image

TiernanDeFranco commented 5 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

Stublic commented 5 months ago

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:

image

iMerica commented 5 months ago

Temp workaround:

.eq('id', parseInt(user?.id || '0'));
guylepage3 commented 5 months ago

Sooo many typescript errors..

Once you fix that one it's on to the next.

image
guylepage3 commented 5 months ago

And then the next... And the next...

Nick-Achee commented 5 months ago

Experiencing the the user? overload issue as well

guylepage3 commented 5 months ago

So what's happening is Stripe made a breaking change and the template could use some love and a fresh update.

Nick-Achee commented 5 months ago

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

guylepage3 commented 5 months ago

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.

Nick-Achee commented 5 months ago

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

leerob commented 4 months ago

https://github.com/vercel/nextjs-subscription-payments/pull/278