Undefined is not an object (evaluating 'React.PropTypes.Number') error


Just updated from expo 21.0.0 to 22.0.0 and I am getting this error:


This is my package.json:

  "name": "APP",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "react-native-scripts": "1.5.0",
    "jest-expo": "^22.0.0",
    "react-test-renderer": "16.0.0-alpha.12"
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "node node_modules/jest/bin/jest.js --watch"
  "jest": {
    "preset": "jest-expo"
  "dependencies": {
    "expo": "^22.0.0",
    "prop-types": "^15.6.0",
    "react": "16.0.0-beta.5",
    "react-native": "https://github.com/expo/react-native/archive/sdk-22.0.1.tar.gz",
    "react-native-autocomplete-input": "3.3.1",
    "react-native-check-box": "2.0.0",
    "react-native-easy-toast": "1.0.9",
    "react-native-elements": "0.13.0",
    "react-native-global-props": "1.1.1",
    "react-native-htmlview": "0.12.1",
    "react-native-modal-dropdown": "0.5.0",
    "react-native-modalbox": "1.4.2",
    "react-native-parallax-scroll-view": "0.20.1",
    "react-native-tag-input": "0.0.14",
    "react-native-vector-icons": "4.2.0",
    "react-navigation": "^1.0.0-beta.27"
  "rnpm": {
    "assets": [

Having hard time figuring out why updating messed up the app. Most likely it is an proptypes update thing, I am not currently not using any proptypes in the app. Any ideas?


Addressed the question here: https://github.com/expo/expo/issues/1415#issuecomment-365005569 but I’ll mention it here for those who encounter the same issue.

If you encounter this error, somewhere in your project whether by your own implementation or within a package you depend on, there are PropTypes being called from under the react package. PropTypes have been migrated to a separate package https://github.com/facebook/prop-types You’ll need to find the location of the PropTypes and change the import statement from import {PropTypes} from 'react' to import PropTypes from 'prop-types' and then change any React.PropTypes.x to PropTypes.x


In addition to @AdamJNavarro 's answer I ran npm outdated and updated all modules that are ‘old’(in package.json). After updating error is gone.

closed #4

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.