NativeBase: React Native 0.38.0-rc.0 - Unable to resolve module react/lib/ReactNativePropRegistry from /project/node_modules/native-base/Components/Widgets/Button.js

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.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (2 by maintainers)

Commits related to this issue

Most upvoted comments

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

Getting this error as well with react-native 0.38.

@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

@thundenilla Please make sure of package versions

  • If you want to work with RN < 0.38 then you should go for NB < 0.5.16
  • For RN >= 0.38, NB 0.5.18 is compatible

#336

Fixed with latest release 0.5.18