Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

undefined is not an object (evaluating 'Component.propTypes') - React Native 0.61.5

$
0
0

I have upgraded the existing react native project from react native 0.59.6 to 0.61.5.

react-native upgrade command not working. So I have done the manual upgrade using upgrade helper. Resolved some post issues. Now project build success.

But After rendering into the ios emulator from Xcode, it is giving the following error.

iPhone XR emulator screenshot

I am not using Component.propTypes anywhere. package.lock.json have some packages with prop-types. I am not sure what it is doing exactly. Otherwise, inside my project, I am not using prop-types also. Please find my package.lock.json below,

package.lock.json

...
...
..."prop-types": {"version": "15.7.2","resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz","integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==","requires": {"loose-envify": "^1.4.0","object-assign": "^4.1.1","react-is": "^16.8.1"
      }
    },
...."react": {"version": "16.9.0","resolved": "https://registry.npmjs.org/react/-/react-16.9.0.tgz","integrity": "sha512-+7LQnFBwkiw+BobzOF6N//BdoNw0ouwmSJTEm9cglOOmsg/TMiFHZLe2sEoN5M7LgJTj9oHH0gxklfnQe66S1w==","requires": {"loose-envify": "^1.1.0","object-assign": "^4.1.1","prop-types": "^15.6.2"
      }
    },
....

package.json

{"name": "wasfat","version": "1.0.3","private": true,"rnpm": {"assets": ["app/assets/fonts/corbel"
    ]
  },"scripts": {"prepare-repository": "npm i -g react-native-cli yarn;yarn install; react- native link","emulator": "emulator -avd Nexus5V6L23_x86_64 -scale 1.0","clean": "watchman watch-del-all && npm cache clean && cd android && ./gradlew clean && cd ..","test": "jest","postinstall": "rm -rf node_modules/react-native-twitter-signin/node_modules","android": "react-native run-android","ios": "react-native run-ios","start": "react-native start","lint": "eslint ."
  },"dependencies": {"jetifier": "^1.6.5","react": "16.9.0","react-native": "^0.61.5","react-native-actionsheet": "^2.4.2","react-native-android-keyboard-adjust": "^1.2.0","react-native-aws3": "0.0.8","react-native-deep-linking": "^2.2.0","react-native-device-info": "^5.3.1","react-native-double-tap": "^1.0.1","react-native-drawer": "^2.5.1","react-native-elements": "^1.0.0","react-native-exception-handler": "^2.10.8","react-native-fbsdk": "^1.1.0","react-native-firebase": "^5.5.6","react-native-gesture-handler": "^1.1.0","react-native-google-signin": "^1.2.3","react-native-hide-with-keyboard": "^1.2.0","react-native-image-crop-picker": "^0.25.3","react-native-image-picker": "^0.28.1","react-native-image-slider": "^2.0.3","react-native-image-view": "^2.1.5","react-native-keyboard-avoiding-view": "^1.0.0","react-native-keyboard-aware-scroll-view": "^0.8.0","react-native-keyboard-aware-scrollview": "^2.0.0","react-native-keyboard-aware-view": "0.0.14","react-native-keyboard-listener": "^1.1.0","react-native-modal": "^11.1.0","react-native-paper": "^2.15.0","react-native-picker-select": "^6.2.0","react-native-popup-menu": "^0.15.6","react-native-progress": "^3.6.0","react-native-read-more-text": "^1.1.0","react-native-responsive-image": "^2.3.1","react-native-responsive-screen": "^1.2.1","react-native-s3-upload": "0.0.12","react-native-share": "^1.2.1","react-native-side-drawer": "^1.1.9","react-native-side-menu": "^1.1.3","react-native-simple-toast": "0.0.8","react-native-snap-carousel": "^3.8.0","react-native-swiper-flatlist": "^1.0.10","react-native-twitter-signin": "^1.1.1","react-native-vector-icons": "^6.6.0","react-native-video": "^4.4.4","react-native-video-controls": "^2.2.3","react-native-video-player": "^0.10.0","react-native-view-more-text": "^2.1.0","react-navigation": "^3.3.0","react-redux": "^7.1.0","react-spinkit": "^3.0.0","redux": "^4.0.4"
  },"devDependencies": {"@babel/core": "^7.6.2","@babel/runtime": "^7.6.2","@react-native-community/eslint-config": "^0.0.5","babel-jest": "^24.9.0","eslint": "^6.5.1","jest": "^24.9.0","metro-react-native-babel-preset": "^0.56.0","react-test-renderer": "16.9.0"
  },"jest": {"preset": "react-native"
  }
}

I have found this https://reactjs.org/warnings/dont-call-proptypes.html regarding this issue. But I am not sure how to use it. Because according to this. some third party libraries using propTypes directly. But how to handle it?

There is no help in 0.61 version Github issues. Please suggest some workarounds for this issue.

Thanks for any help.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>