找不到变量:ReactPropTypes

时间:2019-09-19 11:51:50

标签: javascript android react-native react-props prop

您好,我正在尝试设置旧代码以响应本机版本> 0.57。每当我尝试运行时,都会出现此错误:找不到变量:ReactPropTypes。我什至检查了节点模块,甚至到处都检查了整个代码,但现在并没有错,我不知道现在该怎么办。这是  我的package.json文件。

"dependencies": {
    "crypto-js": "^3.1.9-1",
    "react": "16.6.3",
    "react-native": "0.57.8",
    "react-native-3d-model-view": "^1.2.0",
    "react-native-camera": "^1.6.4",
    "react-native-customisable-switch": "^0.1.0",
    "react-native-datepicker": "^1.7.2",
    "react-native-easy-grid": "^0.2.1",
    "react-native-elements": "^0.19.1",
    "react-native-facebook-login": "^1.6.1",
    "react-native-fetch-blob": "^0.10.8",
    "react-native-fs": "^2.13.3",
    "react-native-gesture-handler": "^1.0.12",
    "react-native-icon-badge": "^1.1.3",
    "react-native-image-marker": "^0.3.9",
    "react-native-image-picker": "^0.28.0",
    "react-native-imagepicker": "^2.0.0",
    "react-native-location": "^2.1.1",
    "react-native-maps": "^0.22.1",
    "react-native-material-dropdown": "^0.11.1",
    "react-native-modal-datetime-picker": "^6.0.0",
    "react-native-modal-picker": "0.0.16",
    "react-native-pdf": "^5.0.11",
    "react-native-pdf-view": "^0.3.2",
    "react-native-picker-dropdown": "^0.1.2",
    "react-native-progress": "^3.5.0",
    "react-native-push-notification": "^3.1.2",
    "react-native-share": "^1.1.3",
    "react-native-side-menu": "^1.1.3",
    "react-native-size-matters": "^0.1.6",
    "react-native-stripe": "^1.2.2",
    "react-native-stripe-api": "^0.1.0",
    "react-native-switch": "^1.5.0",
    "react-native-table-component": "^1.2.0",
    "react-native-vector-icons": "^4.6.0",
    "react-native-view-shot": "^2.5.0",
    "react-native-zip-archive": "^3.0.1",
    "react-navigation": "^3.0.9",
    "react-notification-badge": "^1.4.0",
    "react-viro": "^2.7.3",
    "rn-fetch-blob": "^0.10.15",
    "three": "^0.100.0",
    "tipsi-stripe": "^7.2.0",
    "toggle-switch-react-native": "^2.0.2"
  },

任何帮助将不胜感激。我正在android中运行它。

1 个答案:

答案 0 :(得分:0)

那可能是因为在您的代码中您可能使用过React Proptypes

这是一个特别的类型检查库,您可以在其中定义作为类型传递的类型强制转换变量,无论这些变量是字符串,整数,数组还是函数等,都应作为道具传递。尝试将其导入页面中使用,但在此之前安装库。 Prop类型用于严格的编码结构。

请尝试执行步骤here来安装该库。