我刚刚开始使用 React-Native Expo,其中包含一个在 Android 模拟器中运行 fin 的空白应用程序。但是当我尝试使用 Chrome 开发者工具中的 react-native 调试器时出现错误。
我在 Expo on the emulator 的 Developer 菜单中选择“Debug Remote JS”在 Chrome 中打开这个窗口 /image/V2NKr.png
当我在 chrome 中打开开发人员工具时,我会收到以下错误:
Error: Unable to resolve module `./debugger-ui/ui.bcd3f9d1.js` from ``:
None of these files exist:
* debugger-ui\ui.bcd3f9d1.js(.native|.native.expo.ts|.expo.ts|.native.expo.tsx|.expo.tsx|.native.expo.js|.expo.js|.native.expo.jsx|.expo.jsx|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.wasm|.wasm)
* debugger-ui\ui.bcd3f9d1.js\index(.native|.native.expo.ts|.expo.ts|.native.expo.tsx|.expo.tsx|.native.expo.js|.expo.js|.native.expo.jsx|.expo.jsx|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.wasm|.wasm)
at ModuleResolver.resolveDependency (C:\Users\Daniel\Projects.ReactNative\MyApp\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:163:15)
at ResolutionRequest.resolveDependency (C:\Users\Daniel\Projects.ReactNative\MyApp\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:52:18)
at DependencyGraph.resolveDependency (C:\Users\Daniel\Projects.ReactNative\MyApp\node_modules\metro\src\node-haste\DependencyGraph.js:287:16)
at C:\Users\Daniel\Projects.ReactNative\MyApp\node_modules\metro\src\lib\transformHelpers.js:267:42
at Server.<anonymous> (C:\Users\Daniel\Projects.ReactNative\MyApp\node_modules\metro\src\Server.js:841:41)
at Generator.next (<anonymous>)
at asyncGeneratorStep (C:\Users\Daniel\Projects.ReactNative\MyApp\node_modules\metro\src\Server.js:99:24)
at _next (C:\Users\Daniel\Projects.ReactNative\MyApp\node_modules\metro\src\Server.js:119:9)
同时在 chrome 控制台中得到这些警告:
DevTools failed to load SourceMap: Could not load content for http://localhost:19001/debugger-ui/ui.bcd3f9d1.js.map: HTTP error: status code 500, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:19001/debugger-ui/ui.7beef9ab.css.map: HTTP error: status code 500, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:19001/debugger-ui/debuggerWorker.cff11639.js.map: HTTP error: status code 500, net::ERR_HTTP_RESPONSE_CODE_FAILURE
我试过:
node_modules
和 package-lock.json
然后 npm install
expo r -c
最佳答案
试试这个
npx react-native start --reset-cache
关于reactjs - Expo React-Native 调试器 - 错误 : Unable to resolve module `./debugger-ui/debuggerWorker.cff11639.js` from `` ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63530980/