You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are probably trying to initialise chargebee before the script it's loaded.
Try loading the script first and then use useEffect on mount only to init the instance.
I am using @chargebee/chargebee-js-react-wrapper in react project i added below code in index.html
<script src="https://js.chargebee.com/v2/chargebee.js"> window.ChargeBee.init({ site: 'carestack-test', publishableKey: 'test_Dwrb01yx7K5Jy7EBAwxOJHp8f0vIQGcw', }); </script>and using the CardComponent in different file but i am getting Cannot read properties of undefined (reading 'init')
The text was updated successfully, but these errors were encountered: