美文网首页Vesal学院
react-native 报错红屏 Unable to reso

react-native 报错红屏 Unable to reso

作者: 城东那个小丑 | 来源:发表于2019-12-11 16:09 被阅读0次
    ```javascript
    error: bundling failed: Error: Unable to resolve module `./../../../react-transform-hmr/lib/index.js` from `F:\RN\TS\ph_front_android_medical\src\App.tsx`: The module `./../../../react-transform-hmr/lib/index.js` could not be found from `F:\R
    N\TS\ph_front_android_medical\src\App.tsx`. Indeed, none of these files exist:
      * `F:\RN\react-transform-hmr\lib\index.js(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
      * `F:\RN\react-transform-hmr\lib\index.js\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
        at ModuleResolver.resolveDependency (F:\RN\TS\ph_front_android_medical\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:209:697)
        at ResolutionRequest.resolveDependency (F:\RN\TS\ph_front_android_medical\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:83:16)
        at DependencyGraph.resolveDependency (F:\RN\TS\ph_front_android_medical\node_modules\metro\src\node-haste\DependencyGraph.js:222:485)
        at Object.resolve (F:\RN\TS\ph_front_android_medical\node_modules\metro\src\lib\transformHelpers.js:149:25)
        at dependencies.map.result (F:\RN\TS\ph_front_android_medical\node_modules\metro\src\DeltaBundler\traverseDependencies.js:316:29)
        at Array.map (<anonymous>)
        at resolveDependencies (F:\RN\TS\ph_front_android_medical\node_modules\metro\src\DeltaBundler\traverseDependencies.js:312:16)
        at F:\RN\TS\ph_front_android_medical\node_modules\metro\src\DeltaBundler\traverseDependencies.js:169:33
        at Generator.next (<anonymous>)
        at step (F:\RN\TS\ph_front_android_medical\node_modules\metro\src\DeltaBundler\traverseDependencies.js:271:307)
     BUNDLE  [android, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (2/174), failed.
    

    解决办法:执行 react-native start --reset-cache

    相关文章

      网友评论

        本文标题:react-native 报错红屏 Unable to reso

        本文链接:https://www.haomeiwen.com/subject/nzdkuctx.html