stripe / stripe-react-native

React Native library for Stripe.
https://stripe.dev/stripe-react-native
MIT License
1.28k stars 264 forks source link

yarn add @stripe/stripe-react-native giving error getConstants of null #1686

Closed AliCemilcan closed 4 months ago

AliCemilcan commented 4 months ago

Describe the bug When we initialized Stripe to out react native project by following this documentation I got an error saying TypeError: Cannot read property 'getConstants' of null, js engine: hermes

To Reproduce Steps to reproduce the behavior: yarn add @stripe/stripe-react-native cd ios/ pod install

Expected behavior Yarn start -c should run the eas development build and I should be apple to run my react native app on the simulator

Desktop (please complete the following information):

SS

image

My package.json

{
  "name": "fitfinder-app",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "pod-install": "cd ios && pod install && cd .. && expo start --dev-client",
    "ios-simulator-build": "eas build --profile development-simulator --platform ios",
    "ios-device-build": "eas build --profile development --platform ios",
    "run-build": "eas build:run -p ios --latest",
    "run-lint": "eslint ."
  },
  "dependencies": {
    "@expo/ngrok": "^4.1.3",
    "@gorhom/bottom-sheet": "^4.4.7",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/datetimepicker": "6.7.3",
    "@react-native-community/netinfo": "9.3.7",
    "@react-native-google-signin/google-signin": "^10.0.1",
    "@react-native-seoul/masonry-list": "^1.4.2",
    "@react-navigation/native": "^6.1.7",
    "@react-navigation/native-stack": "^6.9.13",
    "@shopify/flash-list": "1.4.0",
    "@stripe/stripe-react-native": "0.38.1",
    "@supabase/supabase-js": "^2.33.1",
    "@types/react": "~18.0.27",
    "axios": "^1.4.0",
    "base64-arraybuffer": "^1.0.2",
    "expo": "~48.0.21",
    "expo-apple-authentication": "~6.0.1",
    "expo-blur": "~12.2.2",
    "expo-calendar": "~11.1.1",
    "expo-checkbox": "~2.3.1",
    "expo-constants": "~14.2.1",
    "expo-dev-client": "~2.2.1",
    "expo-device": "~5.2.1",
    "expo-image": "~1.0.2",
    "expo-image-picker": "~14.1.1",
    "expo-linear-gradient": "~12.1.2",
    "expo-linking": "~4.0.1",
    "expo-localization": "~14.1.1",
    "expo-location": "~15.1.1",
    "expo-mail-composer": "~12.1.1",
    "expo-notifications": "~0.18.1",
    "expo-splash-screen": "~0.18.2",
    "expo-status-bar": "~1.4.4",
    "expo-tracking-transparency": "~3.0.3",
    "geolib": "^3.3.4",
    "lodash": "^4.17.21",
    "moment-timezone": "^0.5.43",
    "nativewind": "^2.0.11",
    "react": "18.2.0",
    "react-native": "0.71.14",
    "react-native-blurhash": "^1.1.11",
    "react-native-calendars": "^1.1299.0",
    "react-native-element-dropdown": "^2.10.0",
    "react-native-fbsdk-next": "^12.1.0",
    "react-native-flash-message": "^0.4.2",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-gifted-chat": "^2.4.0",
    "react-native-google-places-autocomplete": "^2.5.6",
    "react-native-localize": "^3.1.0",
    "react-native-maps": "1.3.2",
    "react-native-mmkv": "^2.10.2",
    "react-native-otp-textinput": "^1.1.0",
    "react-native-phone-number-input": "^2.1.0",
    "react-native-qrcode-svg": "^6.3.0",
    "react-native-reanimated": "~2.14.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-shared-element": "^0.8.8",
    "react-native-shimmer-placeholder": "^2.0.9",
    "react-native-svg": "14.1.0",
    "react-native-swiper": "^1.6.0",
    "react-native-ui-lib": "^7.5.2",
    "react-native-url-polyfill": "^2.0.0",
    "socket.io-client": "^4.7.2"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@react-native-community/eslint-config": "^3.2.0",
    "@types/lodash": "^4.14.200",
    "@types/react-native": "^0.72.2",
    "eslint": "^9.1.1",
    "react-native-dotenv": "^3.4.9",
    "react-native-svg-transformer": "^1.0.0",
    "tailwindcss": "^3.3.2",
    "ts-node": "^10.9.1",
    "typescript": "^4.9.4"
  },
  "private": true
}
### Tasks
AliCemilcan commented 4 months ago

npx react-native start --reset-cache solved the problem