1

I have facing an issue in react native. My React native project completely working on windows environment. And then I have cloned this same project in the Mac system and try to run this project and it is throwing an error."TypeError: undefined is not an object (evaluating '_react.PropTypes.array')". My project has not shown any result for PropTypes. I have restart server so many times. I tried different solutions but nothing work. Please help me to solve this issue

Here is my node logs

 ERROR  TypeError: undefined is not an object (evaluating '_react.PropTypes.array')
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.  
 This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.   
 This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

1 Answer 1

4

I solved this issue. It took so much time to identify the issue. In my project "react-native-snap-carousel" library throw this error and after detecting the issue I followed this link:

npm install prop-types --save // install this
import PropTypes from 'prop-types'; // add import in snap carousel file & remove PropTypes from 'react-native'
Sign up to request clarification or add additional context in comments.

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.