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)

Most upvoted comments

👍 - 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

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:

  1. check “Compatibility Versions” https://github.com/GeekyAnts/NativeBase#6-compatibility-versions
  2. modify “native-base” version in package.json
    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 !)
  3. delete “native-base” folder in your node_modules
  4. reinstall and it works fine! npm install native-base --save react-native link

@ghhamza Use this instead

"axios": "^0.16.2",
"expo": "^18.0.4",
"firebase": "^4.1.3",
"native-base": "2.2.0",
"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"

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