While working with React-Native Android Application sometimes we face this issue saying -
Undefined is not an object (evaluating 'Component.propsType').
This issue generally occurs when our npm package versions get altered somehow.
I have faced this error while trying to optimize my package.json. I have tried a lot of option cleaning Build folder, Resetting cache etc. but nothing worked.
Here are the few steps to resolve the error Undefined is not an object (evaluating 'Component.propsType').-
- Make Sure you Reverse all your changes made in your package.json file.
- Delete node_modules folder inside your react-native application code
- Delete package-lock.json file
- Go To Android Studio/Build/Clean and clean the project build
- After that do npm install in your react-native project directory
- Run npm start --reset-cache to reset bundler cache
- After that run react-native run-android
- It will start working now
This comment has been removed by the author.
ReplyDelete