简体   繁体   English

undefined 不是一个对象(评估'_reactNative.Animated.Text.propTypes.style')

[英]undefined is not an object (evaluating '_reactNative.Animated.Text.propTypes.style')

I encountered this error when upgraded react-native version to 0.63.0 .我在将 react-native 版本升级到0.63.0时遇到了这个错误。 I searched this error but according to other sources it is either problem in react-native-material-dropdown or in react-native-material-textfield.我搜索了这个错误,但根据其他来源,它要么是 react-native-material-dropdown 中的问题,要么是 react-native-material-textfield 中的问题。 I have also tried to look for Animated.Text.propTypes in node_modules but it does not exist.我也尝试在 node_modules 中查找 Animated.Text.propTypes 但它不存在。 Although i found it in main.bundle.js in ios folder.虽然我在 ios 文件夹的 main.bundle.js 中找到了它。 My Pod file is as following:我的 Pod 文件如下:

    require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'Project_name' do
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
  
  config = use_native_modules!
  use_react_native!(:path => config["reactNativePath"])

 
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end

end

Package.json file is as following: Package.json 文件如下:

{
  "name": "Project_name",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.12.0",
    "@react-native-community/datetimepicker": "^3.0.1",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/native": "^5.7.3",
    "@react-navigation/stack": "^5.9.0",
    "accordion-collapse-react-native": "^0.3.2",
    "axios": "^0.20.0",
    "date-fns": "^2.16.1",
    "debounce": "^1.2.0",
    "fetch-timeout": "0.0.2",
    "http": "0.0.1-security",
    "https": "^1.0.0",
    "install": "^0.13.0",
    "lodash": "^4.17.20",
    "moment": "^2.27.0",
    "native-base": "^2.13.14",
    "npm": "^6.14.8",
    "react": "16.13.1",
    "react-native": "0.63.2",
    "react-native-af-video-player": "^0.2.1",
    "react-native-asset-library-to-base64": "^1.1.0",
    "react-native-autocomplete-input": "^4.2.0",
    "react-native-aws3": "0.0.9",
    "react-native-background-upload": "^6.1.0",
    "react-native-beautiful-video-recorder": "^2.0.1",
    "react-native-camera": "^3.38.0",
    "react-native-check-box": "^2.1.7",
    "react-native-checkbox": "^2.0.0",
    "react-native-cookies": "^3.3.0",
    "react-native-datepicker": "^1.7.2",
    "react-native-device-info": "^6.0.1",
    "react-native-dropdown-picker": "^3.6.8",
    "react-native-event-listeners": "^1.0.7",
    "react-native-fs": "^2.16.6",
    "react-native-gallery-manager": "^1.0.9",
    "react-native-gesture-handler": "^1.7.0",
    "react-native-image-picker": "^2.3.3",
    "react-native-keep-awake": "^4.0.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.2",
    "react-native-keychain": "^6.1.1",
    "react-native-material-buttons": "^0.6.0",
    "react-native-modal-datetime-picker": "^8.9.3",
    "react-native-modal-dropdown": "^0.6.2",
    "react-native-navybits-date-time-picker": "^1.2.3",
    "react-native-permissions": "^2.2.0",
    "react-native-reanimated": "^1.13.0",
    "react-native-safe-area-context": "^3.1.7",
    "react-native-screens": "^2.10.1",
    "react-native-stopwatch-timer": "0.0.21",
    "react-native-touch-id": "^4.4.1",
    "react-native-video": "^5.1.0-alpha8",
    "react-native-video-editor": "^0.2.0",
    "react-native-walkthrough-tooltip": "^1.1.10",
    "react-navigation": "^4.4.0",
    "realm": "^6.1.0"
  },
  "devDependencies": {
    "@babel/core": "7.11.5",
    "@babel/runtime": "7.11.2",
    "@react-native-community/eslint-config": "1.1.0",
    "babel-jest": "25.5.1",
    "eslint": "6.8.0",
    "jest": "25.5.4",
    "metro-react-native-babel-preset": "0.59.0",
    "react-test-renderer": "16.13.1"
  },
  "jest": {
    "preset": "react-native"
  }
}

Anyone suffering from this nightmare it was react-native-material-button that was causing this issue.任何遭受这个噩梦的人都是造成这个问题的 react-native-material-button 。 Turns out that vs code do not completely search node modules.事实证明,vs 代码并没有完全搜索节点模块。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React Native,未定义不是 object(评估 '_reactNative.Image.propTypes.resizeMode') - React Native, undefined is not an object (evaluating ‘_reactNative.Image.propTypes.resizeMode’) undefined 不是对象(评估'_reactNative.PropTypes.string')错误 - undefined is not an object (evaluating '_reactNative.PropTypes.string') Error 未定义不是对象。(评估“ PropTypes.number”) - undefined is not an object.(evaluating 'PropTypes.number') 未定义的react-native-maps不是对象(评估'PropTypes.string') - react-native-maps undefined is not an object (evaluating 'PropTypes.string') 为什么我得到“undefined不是一个对象(评估PropTypes.shape)”? - Why am I getting “undefined is not an object (evaluating PropTypes.shape)”? React Native:'undefined不是一个对象(评估'_react3.PropTypes.bool') - React Native: 'undefined is not an object (evaluating '_react3.PropTypes.bool') 未定义不是对象(评估“React.PropTypes.Number”)错误 - Undefined is not an object (evaluating 'React.PropTypes.Number') error 错误 PropTypes React Native undefined is not an object(评估'_propTypes.default.nymber.isRequired') - Error PropTypes React Native undefined is not an object (evaluating '_propTypes.default.nymber.isRequired') TypeError:undefined不是ReactNative中的对象(评估'_props.listMessagesQuery.listMessages') - TypeError: undefined is not an object(evaluating '_props.listMessagesQuery.listMessages') in ReactNative React native Animated undefined不是对象(评估'u.stopTracking') - React native Animated undefined is not an object (evaluating 'u.stopTracking')
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM