Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expo Go Stripe: Native module cannot be null

I believe Expo-Go can now support Stripe payments (based off the updated docs provided here.)

I am using Expo SDK Version 40.

I perform

"expo install @ stripe/stripe-react-native"

to ensure I'm getting the correct version.

Then I attempt to import Stripe into my project using:

import { StripeProvider } from '@stripe/stripe-react-native'

As soon as the project refreshes, the app crashes and throws ~25 errors/warnings, most commonly the "Native module cannot be null" error

Has anyone else encountered this error?

like image 659
MK_Pierce Avatar asked Jan 21 '26 11:01

MK_Pierce


1 Answers

I am using Expo SDK Version 40.

You have to use a higher version like 41/42, I believe, so I'd try updating that. Per the link you shared, you'll note that https://docs.expo.dev/versions/v41.0.0/sdk/stripe/ exists but https://docs.expo.dev/versions/v40.0.0/sdk/stripe/ doesn't for instance.

https://github.com/stripe/stripe-react-native/issues/467#issuecomment-889217595

https://github.com/stripe/stripe-react-native/issues/256#issuecomment-846922117

like image 130
karllekko Avatar answered Jan 24 '26 01:01

karllekko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!