#D.D-ReactNative
1 messages · Page 1 of 1 (latest)
Hi, I think this is not really related to Apollo. It could be something wrong with your ReactNative setup
I found around 4 similar issues in Github. i.e. https://github.com/stripe/stripe-react-native/issues/770
I think so, only see a few ones with this errors and all of them used apollo client. Some changes are required in the metro config.
Not very familiar with RaectNative, but could you try the workaround there?
Yep I went over there already
Sadly didn't work for me
But thanks for the help anyways
No luck with the last comment? https://github.com/stripe/stripe-react-native/issues/770#issuecomment-1023025765
Sorry for a dummy question, but did you also define the metro.config.js from here? https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md#apollo-client-354-2021-11-19
Yes I did the apollo client workaround, but when I try to do the change from here: https://github.com/stripe/stripe-react-native/issues/770#issuecomment-1023025765
I got another error cause wrong module import/require
I'm in this situation:
https://stackoverflow.com/questions/71417350/react-native-x-stripe-integration-error-unable-to-resolve-module-stripepr
Oh is that you asking the SO question?
I still see
const { getDefaultConfig } = require("metro-config")
in the SO question, how about changing it to
const { getDefaultConfig } = require('metro-config/src/defaults/defaults')
?
I'm not asking the question, but that's exactly my question. 🙂
When I do that I start getting error Cannot read property 'getDefaultValues' of undefined
Cause ```const { getDefaultConfig } = require('metro-config/src/defaults/defaults')
is not a valid way of importing, so just getting undefined
I already check I the results from doing const { getDefaultConfig } = require("metro-config")
Are fine in my case
hmm
I'm convinced it has something to do with my tsconfig setup as you said before but dunno where
At this stage, might be the fastest way is creating a new issue on our React Native repo
hmmm, Alright, I will try a few more things and probably do that. Thanks for the help.
Sorry for not being really helpful. If I can find someone who is more familiar with ReactNative, I will drag them in here
Ok, thanks
Hi @solar knot I'm Jack, let me jump in and help you.
Can you send me the dependencies that you have included in the package.json ?
Hey sure.
"dependencies": {
"@apollo/client": "^3.5.5",
"@react-native-async-storage/async-storage": "^1.13.4",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-picker/picker": "^2.3.1",
"@react-navigation/bottom-tabs": "^5.11.7",
"@react-navigation/native": "^5.9.2",
"@react-navigation/stack": "^5.14.2",
"@reduxjs/toolkit": "^1.5.0",
"@stripe/stripe-react-native": "^0.4.0",
"@titelmedia/react-apollo-multiple-clients": "^4.0.5",
"graphql": "^16.0.1",
"i18n-js": "^3.8.0",
"intl": "^1.2.5",
"lodash.memoize": "^4.1.2",
"moment": "^2.29.1",
"react": "16.13.1",
"react-apollo": "^3.1.5",
"react-native": "0.64.3",
"react-native-animatable": "^1.3.3",
"react-native-appearance": "^0.3.4",
"react-native-calendar-picker": "^7.1.2",
"react-native-device-info": "^8.0.1",
"react-native-dotenv": "^3.3.0",
"react-native-elements": "^3.2.0",
"react-native-fbsdk": "^3.0.0",
"react-native-geolocation-service": "^5.3.0-beta.3",
"react-native-gesture-handler": "^1.10.1",
"react-native-google-signin": "^2.1.1",
"react-native-image-picker": "^4.7.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^2.1.1",
"react-native-maps": "^0.29.3",
"react-native-permissions": "^3.1.0",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^2.17.1",
"react-native-simple-events": "^1.0.1",
"react-native-snap-carousel": "^3.9.1",
"react-native-splash-screen": "^3.2.0",
"react-native-vector-icons": "^8.0.0",
"react-redux": "^7.2.2",
"redux": "^4.0.5",
"rn-range-slider": "^2.1.1"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@babel/plugin-transform-typescript": "^7.16.8",
"@babel/runtime": "^7.17.2",
"@react-native-community/eslint-config": "^1.1.0",
"@types/jest": "^25.2.3",
"@types/react-native": "^0.63.2",
"@types/react-native-dotenv": "^0.2.0",
"@types/react-native-fbsdk": "^3.0.0",
"@types/react-native-snap-carousel": "^3.8.2",
"@types/react-redux": "^7.1.16",
"@types/react-test-renderer": "^16.9.2",
"@types/redux": "^3.6.0",
"babel-jest": "^25.1.0",
"eslint": "^6.5.1",
"jest": "^25.1.0",
"metro-react-native-babel-preset": "^0.59.0",
"react-test-renderer": "16.13.1",
"typescript": "^4.6.2"
},```
FYI @ivory kraken
Hi, sorry we didn't have an answer for you. Please create a new issue on RN repo and feel free to open new thread if you have follow up questions