NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Unable to resolve module `react-native/Libraries/Renderer/shims/ReactNativePropRegistry` from `........./node_modules/native-base/dist/src/Utils/computeProps.js`

Open ckim16 opened this issue 9 years ago • 35 comments

Hi all,

I'm currently using "native-base": "^2.2.1" and "react-native": "^0.44.3" and I get an error saying

Unable to resolve module react-native/Libraries/Renderer/shims/ReactNativePropRegistry from path/to/node_modules/native-base/dist/src/Utils/computeProps.js.

I believe this is a version issue and but not sure this is a native-base's issue or react-native's issue.

Has anyone had same problem before?

ckim16 avatar Jul 12 '17 16:07 ckim16

i had this problem too in 0.42.0 after upgrading to 0.46.1 i have a new one ! /================================================/ Bundling index.android.js 97.7% (1221/1235), failed. error: bundling failed: "Unable to resolve module react-native/Libraries/Renderer/src/renderers/native/createReactNativeComponentClass from C:\\Users\\Hamid\\Documents\\ReactXP\\Samples\\hello-world\\node_modules\\react-native-svg\\elements\\Rect.js: Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all.\n 2. Delete the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start -- --reset-cache."

Hamid-Najafi avatar Jul 12 '17 19:07 Hamid-Najafi

👍 - We are also seeing this issue:

"native-base": "^2.1.5", "react": "16.0.0-alpha.12", "react-native": "0.45.1",

I can add more info if required

thinq4yourself avatar Jul 12 '17 20:07 thinq4yourself

Same error as @ckim16 env:

"react-native": "^0.46.1",
"native-base": "2.1.5",

Nahueleti avatar Jul 12 '17 20:07 Nahueleti

👍 - We are also seeing this issue: "native-base": "^2.1.5", "react": "16.0.0-alpha.12", "react-native": "0.45.1",

@thinq4yourself seems to be a problem with native-base 2.2.1. Just remove the "^" and choose version 2.2.0. Delete everything and execute "npm install" again. It should work then, it took me almost an hour to find the reason for this bug.

I'm also using RN 0.45.1

Maxeh avatar Jul 12 '17 20:07 Maxeh

@Maxeh confirmed working, thanks!

Nahueleti avatar Jul 12 '17 20:07 Nahueleti

I upgraded react-native to 0.46.1 and it seems to be working fine. I'm not sure what just happened.

ckim16 avatar Jul 12 '17 20:07 ckim16

@ckim16 but im getting this error and i dont know why !

Sent from my Samsung SM-N920C using FastHub

Hamid-Najafi avatar Jul 12 '17 20:07 Hamid-Najafi

@Goldenstarc Wish I really can explain what just happened with mine but I'm afraid. All I did for last hour or longer was trying different version of NB and RN and remove node_modules, re-install, clean up Xcode, and so on.. Finally it worked with"native-base": "^2.2.1", "react-native": "^0.46.1" and "react": "^16.0.0-alpha.12". Honestly tho, I'm not sure it will keep working fine once I stop the task now and re-build after couple hours.

ckim16 avatar Jul 12 '17 20:07 ckim16

@ckim16 @Goldenstarc #307

shivrajkumar avatar Jul 13 '17 05:07 shivrajkumar

@Maxeh confirmed working, thanks!

AndsteLyc avatar Jul 14 '17 14:07 AndsteLyc

I'm also: "native-base": "^2.1.5", "react": "16.0.0-alpha.12", "react-native": "0.45.1", and it happens to me too. I just go into computeProps.js and change the import statement to: "react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry" and it works however, sometimes when i re open the project, it reverts back to the old import which throws me this error. i think this may be because i delete all my modules then reinstall (for the weird errors i get when i try to install other modules). But anyways, does anyone knows why this happens? I check the compatibility in NB docs and it's okay.

yukkeechang avatar Jul 14 '17 18:07 yukkeechang

"native-base": "^2.2.1", "react": "16.0.0-alpha.12", "react-native": "^0.45.1",

I'm also. I create a project with CRNA, install native-base and run ok. Then i create another project and copy list dependencies from old project paste to new project, run yarn install and start. It's not woking. I don't know why !!!!!!

trankhacvy avatar Jul 15 '17 17:07 trankhacvy

I think using NB for enterprise project it's very dangerous, I have this kind of errors every time I'm trying to upgrade or change a npm module :( And I'm losing many hours for that !

ghhamza avatar Jul 16 '17 01:07 ghhamza

@Levi-ackerman I think that is because NB v2.2.1 is for react-native v0.46.0 and up according to this thread https://github.com/GeekyAnts/NativeBase/issues/1021

"native-base": "^2.2.0", "react": "16.0.0-alpha.12", "react-native": "^0.46.0"

And I'm still getting this issue, using CRNA. Weird.

Pluue avatar Jul 16 '17 10:07 Pluue

I tried all the possible combinations ...

ghhamza avatar Jul 16 '17 10:07 ghhamza

Me too @ghhamza and it's doesn't work, do you have any solutions ?

lionel95200x avatar Jul 18 '17 14:07 lionel95200x

I'm also having this issue. Tried the combinations above with no success.

alihaghani avatar Jul 18 '17 14:07 alihaghani

@Pluue @ghhamza @lionel95200x @AliHaghani If RN 0.46 and native-base 2.2.1 isn't working for you, can you please post your package.json?

sankhadeeproy007 avatar Jul 18 '17 14:07 sankhadeeproy007

@sankhadeeproy007

"dependencies": { "axios": "^0.16.2", "expo": "^18.0.4", "firebase": "^4.1.3", "native-base": "^2.2.1", "react": "16.0.0-alpha.12", "react-native": "0.45.0", "react-native-action-button": "^2.7.2", "react-native-autocomplete-input": "^3.3.1", "react-native-navbar": "^1.7.1", "react-native-vector-icons": "^4.2.0", "react-navigation": "^1.0.0-beta.11", "react-redux": "^5.0.5", "redux": "^3.7.2", "redux-persist": "^4.8.2", "redux-thunk": "^2.2.0" }

ghhamza avatar Jul 18 '17 14:07 ghhamza

@sankhadeeproy007 Me I have the same error than @Goldenstarc

Unable to resolve module react-native/Libraries/Renderer/src/renderers/native/createReactNativeComponentClass from '/project/myProject/react-native-svg/elements/Rect.js

Here it's my package.json 👍

"dependencies": { "expo": "^17.0.0", "firebase": "^4.1.3", "geofire": "^4.1.2", "lodash": "^4.17.4", "lottie-react-native": "^1.1.1", "moment": "^2.18.1", "native-base": "2.2.1", "prop-types": "^15.5.10", "react": "16.0.0-alpha.6", "react-native": "^0.46.0", "react-native-gifted-chat": "^0.1.4", "react-native-material-kit": "^0.4.1", "react-native-multislider": "0.0.14", "react-native-swiper": "^1.5.4", "react-navigation": "^1.0.0-beta.11", "react-redux": "^5.0.5", "redux": "^3.7.1", "redux-thunk": "^2.2.0" }

lionel95200x avatar Jul 18 '17 14:07 lionel95200x