Skip to content Skip to sidebar Skip to footer

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': {

Solution 1:

PropTypes is removed from react so you need to install prop-types and import it from that:

Install prop-types:

npm install prop-types --save

Import PropTypes from prop-type instead of import PropTypes from react:

import PropTypes from 'prop-types';

Solution 2:

Check JS file for all module from npm module

"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"

replace

import {PropTypes} from 'react';

with

import PropTypes from 'prop-types';

in every file


Post a Comment for "Undefined Is Not An Object (evaluating 'React.PropTypes.Number') Error"