AgentBurgundy / fire-saas

FireSaaS is a Next.js Boilerplate Project for quickly building SaaS apps with Firebase, Stripe and Mixpanel.
https://firesaas.dev
Other
16 stars 0 forks source link

Cannot read SubscriptionCard details from Stripe API #7

Open avetise opened 1 week ago

avetise commented 1 week ago

Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'map')

Source src\components\subscription\SubscriptionCard.tsx (43:29) @ map

avetise commented 1 week ago

Cannot find module '@/lib/types/StripeProductData' or its corresponding type declarations.ts(2307)

AgentBurgundy commented 1 week ago

If you look at line 43 on /components/subscription/SubscriptionCard.tsx there is this line

{featuresMap[name].map((feature: any, index: number) => (...

This uses the featuresMap at the top of that file to map the product name from Stripe to a list of features to display.

One solution may be to just make sure the names of your products in that map match the names of your products in stripe.

The other error may be something that was fixed in a later version. I can tell by the directory it's calling that you're on an older version.

Try running the npm run update-from-upstream script, if you have a version from before that was added you can grab the js file from here and add the script to the package.json