Tried upgrading to React Native 0.37.0 and got this error: https://github.com/facebook/react-native/issues/11004
Upgraded to React Native 0.38.0-rc.0and got past that error, now getting error from Native Base:
Unable to resolve module react/lib/ReactNativePropRegistry from /project/node_modules/native-base/Components/Widgets/Button.js
"native-base": "0.5.15",
"react": "15.4.0",
"react-native": "0.38.0-rc.0",
EDIT:
"native-base": "0.5.15",
"react": "15.3.2",
"react-dom": "15.3.2",
"react-native": "0.37.0",
Works for me.
Hi, can I check with you:
It is still incompatible with latest react v15.4.0, so either React or Nativebase has to fix it, right? Should not we leave the issue open?
Is ReactDOM needed ?
Thank you. Cheers
@tzyhhaur I reopened it for you. I believe React DOM is needed: https://facebook.github.io/react/blog/2016/11/16/react-v15.4.0.html#separating-react-and-react-dom
Getting this error as well with react-native 0.38.
Actually, the following work:
import { ReactNativePropRegistry } from 'react-native';
OR
var ReactNativePropRegistry = require{'react-native'};
So, it seems that ReactNativePropRegistry is indeed publicly exposed now, but it should not be referenced with an absolute path.
This needs to be fixed in:
NativeBase
Components/Widgets/Button.js
Utils/computeProps.js
react-native-easy-grid
Utils/computeProps.js
Fixed with latest release 0.5.18
@SupriyaKalghatgi im using this version :
"native-base": " 0.5.18",
"react": "15.3.2",
"react-native": "0.35.0",
and its still the same.
@thundenilla Please make sure of package versions
this is still happening right now
"dependencies": {
"@expo/vector-icons": "5.0.0",
"expo": "^18.0.3",
"native-base": "2.2.1",
"react": "16.0.0-alpha.12",
"react-native": "^0.45.1"
}
@Solitaryo Please check this
I get the same error just like Solitaryo , i check the link still can't figure it out . Can you explain why , shivrajkumar. That would be appreciated.
Hey , try to remove "native-base": "^2.2.1", npm uninstall --save native-base and reinstall 2.2.0
npm install --save [email protected]
It can solve the issue for now.
@monodop RN keeps changing the path of ReactNativePropRegistry. They changed the path in RN 0.38.x and again now its changed in RN 0.46.x. It is an internal API, so it has to be imported from absolute path. Thus NativeBase v2.2.1 has been updated with the new path which works for RN 46.
For RN < 46, go for NativeBase 2.2.0
Now i know what's going on , thanks shivrajkumar
@shivrajkumar I came to this issue from another ReactNativePropRegistry issue which was basically, my computeProps.js would change the import path (from "react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry" to 'react-native/libraries/Renderer/shims/ReactNativePropRegistry)would you be able to explain why even if i have the compatabilities "native-base": "^2.1.5", and "react-native": "^0.44.0", and after I change the incorrect path back to the original path that the error still pops up sometimes when I re run the project? This also happens to me with another module and it keeps happening and its so extremely frustrating
@shivrajkumar , can you update the dependencies so the wrong version of native-base doesn't get installed with the wrong version of react-native? All I do is "yarn add native-base", and it doesn't properly update the react-native to the version needed. Manually downgrading/upgrading (ignoring what the dependencies handle) isn't a solution.
Can you please update the docs:
https://docs.nativebase.io/docs/GetStarted.html
Most helpful comment
Actually, the following work:
import { ReactNativePropRegistry } from 'react-native';
OR
var ReactNativePropRegistry = require{'react-native'};
So, it seems that ReactNativePropRegistry is indeed publicly exposed now, but it should not be referenced with an absolute path.
This needs to be fixed in:
NativeBase
Components/Widgets/Button.js
Utils/computeProps.js
react-native-easy-grid
Utils/computeProps.js