Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read SubscriptionCard details from Stripe API #7

Open
avetise opened this issue Sep 4, 2024 · 2 comments
Open

Cannot read SubscriptionCard details from Stripe API #7

avetise opened this issue Sep 4, 2024 · 2 comments

Comments

@avetise
Copy link

avetise commented Sep 4, 2024

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

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

@avetise
Copy link
Author

avetise commented Sep 4, 2024

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

@AgentBurgundy
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants