javascript - Uncaught Error : Cannot add node "1" because a node with that id is already in the Store

标签 javascript reactjs react-native react-native-debugger

I can't debug in react-native using the react-native debugger 

   Uncaught Error: Cannot add node "1" because a node with that id is already in the Store.
    C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:48 Uncaught Error: Cannot add node "1" because a node with that id is already in the Store.
        at C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:48
        at c.emit (C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:48)
        at C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:48
        at C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:48
        at Array.forEach (<anonymous>)
        at S.Gc.e.onmessage (C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:48)
        at S.n (C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:40)
        at S.emit (events.js:315)
        at e.exports.P (C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:8)
        at e.exports.emit (events.js:315)
        at e.exports.dataMessage (C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:8)
        at e.exports.getData (C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:8)
        at e.exports.startLoop (C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:8)
        at e.exports._write (C:\Users\kbelhadjali\AppData\Local\react_native_debugger\app-0.12.1\resources\app.asar\node_modules\react-devtools-core\dist\standalone.js:8)
        at doWrite (_stream_writable.js:403)
        at writeOrBuffer (_stream_writable.js:387)
当我尝试使用 debugger-ui 时,它也无法正常工作并向我显示此错误:
Development Tools failed to load source map: Unable to load content from http: // localhost: 19000 / debugger-ui / debuggerWorker.aca173c4.js.map: Failed to retrieve via target: Target not taken in charge ; Fallback: HTTP error: status code 404, net :: ERR_HTTP_RESPONSE_CODE_FAILURE
我什至创建了一个空白项目来测试问题是否是由我的项目引起的,但它也没有显示同样的错误。
任何帮助我都会非常感激。

最佳答案

我也有这个问题,我的依赖:

...
"expo": "~43.0.0",
"react": "17.0.2",
"react-native": "0.66.3"
好像是 "react-devtools-core"在 react-native 依赖项中安装旧包版本。
我添加了
  "resolutions": {
    "react-devtools-core": "4.14.0"
  }
package.json为了解决这个问题。
我还重新安装了最后一个 react-native-debugger ( brew reinstall react-native-debugger)
也许它会帮助你。

关于javascript - Uncaught Error : Cannot add node "1" because a node with that id is already in the Store,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70699171/

相关文章:

reactjs - 如何在我的 React 应用程序中触发 Bootstrap 弹出窗口

javascript - 是否有一种干净的方法来访问可以未定义但仅在定义时才呈现的对象的属性?

javascript - 在 ReactJS 中从组件状态传递样式

react-native - 如何在没有 webview 的情况下将 vimeo 播放器嵌入 react-native?

react-native - 如何使用 REACT-NATIVE-IMAGE-PICKER 从库中选择视频?

javascript - tinyMCE 5 更改右键单击上下文菜单

javascript - 为什么 Array.prototype 不是 Array 的实例?

javascript - 调整面板在 Bootstrap 中的位置

Javascript - 视频的播放/暂停按钮

reactjs - 如何在 React Navigation 5 中将图像添加到抽屉?