import Iaphub from 'react-native-iaphub';
console.log('Iaphub.Iaphub', Iaphub);
Iaphub.start({
// The app id is available on the settings page of your app
appId: '',
// The (client) api key is available on the settings page of your app
apiKey: '',
// Optional, ff you want to allow purchases when the user has an anonymous user id
// If you're listenning to IAPHUB webhooks your implementation must support users with anonymous user ids
// This option is disabled by default, when disabled the buy method will return an error when the user isn't logged in
allowAnonymousPurchase: true,
// -- OPTIONAL -- //
// App environment (IAPHUB supports multiple environments, an environment act like a separate app and must be created on the IAPHUB dashboard)
//environment: "staging"
});
Tested and we have no issue on our side. Looks like an issue on your side, seems like you cannot import correctly a esModule for some reason.
What's your version of react-native-iaphub and Node.JS?