【问题标题】:React Native: bundling failed - Unable to resolve module `AccessibilityInfo`React Native:捆绑失败 - 无法解析模块“AccessibilityInfo”
【发布时间】:2019-01-05 21:22:06
【问题描述】:

错误:捆绑失败:

错误:无法从 D:\MyApp\node_modules\react-native\Libraries\react-native\react-native-implementation.js 解析模块 AccessibilityInfo:模块 AccessibilityInfo 在 Haste 模块映射中不存在

【问题讨论】:

标签: react-native react-native-android create-react-native-app


【解决方案1】:

  • 标题

    首先尝试

    npm start -- --reset-cache

    如果这不起作用 比删除节点模块和 npm install npm start -- --reset-cache

【讨论】:

    【解决方案2】:

    它在 React native 中存在一些不兼容的版本控制问题。试试这个它会起作用

    1. 在 package.json 中更改以下版本 在依赖项中:-

      "react": "16.3.1"
      "react-native": "0.55.4"
      

      在 devDependencies 中:-

      "babel-preset-react-native": "2.1.0"
      
    2. 删除 node_modules 并运行 npm install --save

    3. 然后通过react-native run-android

    4. 运行应用程序

    它会运行良好...

    【讨论】:

    • 我使用的是 react-native 0.63.4,错误是 -- error Unable to resolve module AccessibilityInfo` from react-native-calendars/node_modules/react-native/Libraries/react-native/react-native-implementation.js: AccessibilityInfo could not be found within the project.` 还是没有运气:(跨度>
    猜你喜欢
    • 1970-01-01
    • 2019-11-15
    • 2019-05-22
    • 2019-04-15
    • 1970-01-01
    • 1970-01-01
    • 2020-04-20
    • 2017-10-11
    • 2016-03-23
    相关资源
    最近更新 更多