dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.81k stars 641 forks source link

Build fails when adding config plugin in expo #2478

Open singhayush1403 opened 1 year ago

singhayush1403 commented 1 year ago

Description

I am not able to add the config plugin into my expo config file. The build fails with an error 'CommandError: Package "react-native-iap" does not contain a valid config plugin. Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

Cannot use import statement outside a module'

Expected Behavior

App build should execute successfully after adding the config plugin

Screenshots

Screenshot 2023-07-06 at 7 23 23 PM Screenshot 2023-07-06 at 7 26 03 PM

Environment:

To Reproduce Steps to reproduce the behavior:

. Create an expo react native project . Install react-native-iap . Add config plugin and run eas build -e production


usmanabid94 commented 1 year ago

check this link: https://usmanabid477.medium.com/in-app-purchase-integration-in-react-native-app-96c0acd13649

liannguyentribal commented 5 months ago

11 Apr 2024 and I confirm that this error still occurs

zeta-gc commented 5 months ago

add fingerprint to ur dependencies

yarn add @expo/fingerprint

masanishi commented 4 months ago

I believe this is relevant. https://github.com/dooboolab-community/react-native-iap/pull/2218 Please try updating to version 12 or above. I was able to resolve it at least with this method. Be careful that running yarn add react-native-iap@next installs v11, not the latest one. yarn add react-native-iapinstalls the latest v12.