react native "TypeError: Cannot read properties of undefined (reading 'string')"

Viewed 296

Trying to run on emulator an existing RN project. When the app runs on the android emulator(API 29) first shows the splash screen then shows the error.

Errors from terminal

[Info] 03-09 08:46:59.686 4743 4831 E ReactNativeJS: TypeError: undefined is not an object (evaluating '_react.default.PropTypes.string')

[Info] 03-09 08:46:59.698 4743 4831 E ReactNativeJS: Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

[Info] 03-09 08:46:59.700 4743 4831 E ReactNativeJS: Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

versions

node: 12.9.0

"react": "16.11.0"
"react-native": "0.62.2"

Screenshot of emulator

1 Answers

The reason you are getting the error is React.PropTypes, according to your error logs. Somewhere in your code trying to use PropTypes from React which is no longer existed since React V15.5 ref. Or maybe you are using an old library that is based on an older React version.

Related