RN运行项目报错:Unable to resolve module `./debugger-ui/debuggerWorker.js` from ``

今天调试demo遇到一个问题,使用react-native run-ios命令启动app,在加载bundle的时候,本地package 服务报了如下错误:

报错

···
Error: Unable to resolve module ./debugger-ui/debuggerWorker.js from ``:

None of these files exist:

  • debugger-ui/debuggerWorker.js(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  • debugger-ui/debuggerWorker.js/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (/Users/fantuan/RnDemo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (/Users/fantuan/RnDemo/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/Users/fantuan/RnDemo/node_modules/metro/src/node-haste/DependencyGraph.js:287:16)
    at /Users/fantuan/RnDemo/node_modules/metro/src/lib/transformHelpers.js:267:42
    at Server. (/Users/fantuan/RnDemo/node_modules/metro/src/Server.js:841:41)
    at Generator.next ()
    at asyncGeneratorStep (/Users/fantuan/RnDemo/node_modules/metro/src/Server.js:99:24)
    at _next (/Users/fantuan/RnDemo/node_modules/metro/src/Server.js:119:9)
    [Fri Sep 25 2020 12:45:39.478] BUNDLE ./index.js
    ···
    在这里插入图片描述
    在React-Native官网的issues中发现了对应的问题,但是下面的反馈来看,大部分都是说rn的版本问题,当前我的demo的版本也是0.62.2
"react": "16.11.0",
 "react-native": "0.62.2",

解决方案

打开React Native Debug Menu 页面,重新关闭打开debug就可以了。

在这里插入图片描述

觉得文章不错的,给我点个赞哇,关注一下呗!
技术交流可关注公众号【君伟说】,加我好友一起探讨

©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页