NativeBase: Unable to resolve module `react-native/Libraries/Renderer/shims/ReactNativePropRegistry` from `........./node_modules/native-base/dist/src/Utils/computeProps.js`
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?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 39
- Comments: 35 (4 by maintainers)
@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
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 !
Thanks, guys! Indeed, it is a version issue for native-base. In fact, We just need to config the compatible version for native-base. Here is the solution:
For example, in my package.json, “react-native”: “0.44.3”, so I modify native-base version for compatibility. “native-base”: “2.2.0” (Remember ,don’t add ^ or ~ symbol before version number !)
@ghhamza Use this instead
I upgraded react-native to 0.46.1 and it seems to be working fine. I’m not sure what just happened.