gpt4 book ai didi

reactjs - Expo React-Native 调试器 - 错误 : Unable to resolve module `./debugger-ui/debuggerWorker.cff11639.js` from ``

转载 作者:行者123 更新时间:2023-12-05 07:02:35 30 4
gpt4 key购买 nike

我刚刚开始使用 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_modulespackage-lock.json 然后 npm install
  • Chrome 开发者工具中的清空缓存和硬重新加载
  • 清除 Expo 缓存,expo r -c
  • 在 Android 虚拟设备上重新安装 Expo

最佳答案

试试这个

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/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com