React native 升级React Native后绑定失败错误

React native 升级React Native后绑定失败错误,react-native,npm,React Native,Npm,在研究如何模拟AsyncStorage进行测试时,我发现我应该使用react community版本,而不是从react native导入它(尽管从react native导入它似乎工作正常,没有任何警告或任何东西) warn add@react native community/async storage很好,但是react native link@react native community/async storage不起作用,所以我在某个地方找到了答案,运行了react native gi

在研究如何模拟
AsyncStorage
进行测试时,我发现我应该使用
react community
版本,而不是从
react native
导入它(尽管从
react native
导入它似乎工作正常,没有任何警告或任何东西)

warn add@react native community/async storage
很好,但是
react native link@react native community/async storage
不起作用,所以我在某个地方找到了答案,运行了
react native git upgrade
,然后我就可以链接了

但是,现在我的应用程序无法运行:

error: bundling failed: Error: Unable to resolve module `react-native/Libraries/Components/View/ViewStylePropTypes` from `/Users/TuzMacbookPro2017/Development/QMG-local/APPS/ELECTRO/node_modules/react-native-reanimated/src/createAnimatedComponent.js`: Module `react-native/Libraries/Components/View/ViewStylePropTypes` does not exist in the Haste module map
This might be related to https://github.com/facebook/react-native/issues/4968
我在互联网上看到,
PropTypes
(我自己从来没有使用过)正在一些依赖项中使用,但已经被弃用或移动了。当然,它以前没有给任何问题

以下是我尝试解决的各种问题,但没有任何帮助:

  • npm更新
  • npm audit fix
    -表示react和react native missing,因此:
  • npm i
  • npm审核修复程序
    -运行
  • (试用应用程序:运行时出现相同的proptypes错误)
  • sudo npm缓存验证
  • (试用应用程序:相同错误)
  • rm-rf节点\模块和纱线安装&rm-rf$TMPDIR/react*&&npm启动-重置缓存
  • (试用应用程序:相同错误)
  • 如果有任何用处,下面是我的
    package.json
    文件

    {
      "name": "Electro",
      "main": "node_modules/expo/AppEntry.js",
      "scripts": {
        "start": "expo start",
        "android": "expo start --android",
        "ios": "expo start --ios",
        "eject": "expo eject",
        "test": "node ./node_modules/jest/bin/jest.js --watchAll"
      },
      "jest": {
        "preset": "jest-expo",
        "testEnvironment": "node"
      },
      "dependencies": {
        "@expo/samples": "2.1.1",
        "@react-native-community/async-storage": "^1.3.4",
        "expo": "^32.0.0",
        "react": "16.8.3",
        "react-dom": "^16.8.6",
        "react-native": "^0.59.6",
        "react-native-elements": "^1.1.0",
        "react-native-geocoding": "^0.3.0",
        "react-native-global-font": "^1.0.2",
        "react-native-indicators": "^0.13.0",
        "react-native-keyboard-aware-scrollview": "^2.0.0",
        "react-native-material-dropdown": "^0.11.1",
        "react-native-render-html": "^4.1.2",
        "react-native-uuid": "^1.4.9",
        "react-navigation": "^3.9.1",
        "react-redux": "^6.0.1",
        "redux": "^4.0.1",
        "redux-test-utils": "^0.3.0",
        "redux-thunk": "^2.3.0",
        "sugar": "^2.0.6"
      },
      "devDependencies": {
        "babel-preset-expo": "^5.0.0",
        "enzyme": "^3.9.0",
        "enzyme-adapter-react-16": "^1.12.1",
        "jest": "^24.8.0",
        "jest-expo": "^32.0.0",
        "jsdom": "^14.1.0",
        "mock-async-storage": "^2.1.0",
        "react-test-renderer": "^16.8.6",
        "redux-mock-store": "^1.5.3"
      },
      "private": true,
      "rnpm": {
        "assets": [
          "./assets/fonts"
        ]
      }
    }
    
    

    有人知道如何让我的应用程序再次运行吗???(即使恢复上一次提交也不起作用!我将尝试降级react native…

    最终,通过恢复提交,我能够让我的应用程序再次运行,然后将
    react native
    版本更改为
    package.json
    返回到
    0.57
    最终,我能够通过恢复提交让我的应用程序再次运行,然后将
    react native
    版本更改为
    package.json
    返回到
    0.57