DevTools Bug: Cannot add node "1" because a node with that id is already in the Store

1.4k Views Asked by At

I am using React native debugger tool in the expo-based react native project.

I am getting the below error when running the debugger

Cannot add node "1" because a node with that id is already in the Store.

and when I dismiss the error I see the following screen

Unsupported DevTools backend version

To fix the above issue, I have added react-devtools: 4.24.1 and react-devtools-core: 4.24.1 as project dev dependencies but it still didn't work.

Any suggestions on how this can be fixed?

React Native version: 0.64.3
OS: macOS Monterey
expo Version: 44.0.6
2

There are 2 best solutions below

0
On

For your first part of the question with the "1" NODE, I am not sure about that fix as I'm still researching it and getting it occasionally.

As for your second part of the downgrade/upgrade problem, I found that I had a global installation of the react-devtools-core of 4.24.1 while my react-devtools in my project was on 4.14.0. To fix it, I first removed any global install, and to find any global instals, you should use the {npm ls -g} command or the {npm list -g}. That should show you if you have the react devtools installed globally, and if you do, just do a {npm uninstall -g react-devtools & npm uninstall -g react-devtools-core}.

Once the global versions are uninstalled, I went back into my project, and {rm package-lock.json & rm -rf node_modules} and then {npm install} to reset the state of the project. Once there, you can do {npm explain react-devtools-core} to find out what version it's using and from which package it's getting its version from. You should then be able to do a {npm install -d [email protected]} (or whatever version it is complaining about. You may have to do this again for the react-devtools but in my case, it was just the "core" that was a different version.

0
On

Remove the { StrictMode } mode in index.js file ,then save