4

Just created a new project using reac-native-init . Using

"react": "16.0.0",
"react-native": "0.51.0",

Running the project from xcode i am getting the below errors

Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

undefined is not an object (evaluating '_react.PropTypes.object')

Searched in my project directory for _react.PropTypes.object. It was being used only in the mobx-react folder. Now my project doesn't run, its stuck at the splash screen. Any help is greatly appreciated

EDIT

Now i am getting this error

_react3.default.PropTypes.shape

But i cant find this line in my whole project

1
  • Can you share the whole error log? Commented Dec 25, 2017 at 17:51

2 Answers 2

7

Simply import prop-types to your project.

import PropTypes from 'prop-types'

If you didn't have it in your project than first install it using yarn or npm

npm install prop-types

or

yarn add prop-types
Sign up to request clarification or add additional context in comments.

2 Comments

I installed it, but its never used in my code and getting the same error
what is the exact error? @ZeeshanAhmadKhalil
1

PropTypes is not included anymore in the core of RN and you need to install it manually. Try that before: https://github.com/facebook/prop-types

Although, it is very weird that you get that issue in the initial project. I don't get surprised anymore since every RN release breaks my code in half.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.