• RN错误随笔


    错误信息:.React Native 运行报错:Unable to resolve module 'AccessibilityInfo'
    复制代码
    可以看到在 异常的返回的JSON 结构中给出了推荐的解决方法 :
    
    This might be related to https://github.com/facebook/react-native/issues/4968
    
    To resolve try the following:
      
    1. Clear watchman watches: `watchman watch-del-all`.
      
    2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
      
    3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.  
    4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`."

    然而:以上方法并没有什么卵用,所以 这里是个深坑,其实原因很简单。官方不知道是不是xxx有问题了,最新版本0.56的貌似存在问题,,,,不测试就发布吗?坑!
    复制代码
    解决方案:降级,

    先卸载旧版本:

    npm uninstall -g react-native-cli

    npm uninstall -g react-native

    再装上指定版本:

    npm install -g react-native@0.55.4

    npm install -g react-native-cli@1.2.0

    创建项目时候 制定版本即可:

    react-native init --version="0.55.4" aapName

     此时便可以正常运行起来!!!

  • 相关阅读:
    PTA(Basic Level)1038.统计同成绩学生
    PTA(Basic Level)1026.程序运行时间
    PTA(Basic Level)1031.查验身份证
    PTA(Basic Level)1061.判断题
    Windows 常用命令
    Windows安装启动MySQL
    classpath路径配置
    IDEA远程调试
    Java Effective 读书笔记
    Try Catch Finally总结
  • 原文地址:https://www.cnblogs.com/Tmc-Blog/p/9869428.html
Copyright © 2020-2023  润新知