简体   繁体   English

反应本机调试器错误 - 无法获取 /debugger-ui/

[英]React Native Debugger Error - Cannot GET /debugger-ui/

React Native Debugger is automatically loading to http://localhost:8081/debugger-ui/ . React Native Debugger 会自动加载到http://localhost:8081/debugger-ui/

However, I keep getting the following error -但是,我不断收到以下错误 -

Cannot GET /debugger-ui/

Apparently they have left a bug in the code.显然他们在代码中留下了一个错误。 For it to work right now, you will have to change the react-native-community module on your own.要让它立即工作,您必须自己更改 react-native-community 模块。

Go to the file转到文件

/node_modules/react-native-community/cli/build/commands/server/middleware/MiddlewareManager.js /node_modules/react-native-community/cli/build/commands/server/middleware/MiddlewareManager.js

and, in the line 97并且,在第 97 行

const debuggerUIFolder = _path().default.join(__dirname, '..', 'util', 'debugger-ui'); const debuggerUIFolder = _path().default.join(__dirname, '..', 'util', 'debugger-ui');

remove the 'util' param, changing it to删除“util”参数,将其更改为

const debuggerUIFolder = _path().default.join(__dirname, '..', 'debugger-ui'); const debuggerUIFolder = _path().default.join(__dirname, '..', 'debugger-ui');

对我来说只是:

  1. rm -rf node_modules && npm i
  2. npm run start -- -- reset-cache
  3. cd ios && rm -rf Pods && pod install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM