zoukankan      html  css  js  c++  java
  • react-native 初始化 各种报错 及 解决方案

    1.Unable to load script from assets 'index.android.bundle'.

    curl -k "http://localhost:8081/index.android.bundle" > android/app/src/main/assets/index.android.bundle

    2.error: bundling failed: Error: Unable to resolve module 'AccessibilityInfo' from

    降级处理

    react-native init AwesomeProject
    cd AwesomeProject
    react-native run-android
    npm uninstall react-native
    npm install --save react-native@0.55.4
    react-native run-android
    npm install --save babel-core@latest babel-loader@latest
    npm uninstall --save-dev babel-preset-react-native
    npm install --save-dev babel-preset-react-native@4.0.0
    react-native run-android

    3.UnableToResolveError: Unable to resolve module ‘***’

    这个问题很常见,原则上是任何npm依赖包都有可能发现这个问题,介绍下解决方案吧

    step one: rm -r node_modules
    step two: npm cache clean --force
    step three: npm install 
    step four: npm start -- --reset-cache

    一般step one, step three, step four就可以解决问题

  • 相关阅读:
    [CERC2015]Digit Division
    [SDOI2012]拯救小云公主
    [不知道出自什么OJ]最大利润
    [USACO08FEB]修路Making the Grade
    P1985 [USACO07OPEN]翻转棋
    P1156 垃圾陷阱
    奶酪
    扫描线
    php数组
    php switch
  • 原文地址:https://www.cnblogs.com/crazycode2/p/9334084.html
Copyright © 2011-2022 走看看