5

When I try to debug my app with React Native Debugger I got that error: "

error from react native debugger

then I do that instruction. install react devtool, and nothin happen. I think, maybe, I have some error when installing the package, so I run react devtools and see that current version 4.23.0

react-devtools version

so anybody have any idea how I can fix that problem?

Shoaib Khan
  • 1,020
  • 1
  • 5
  • 18
Antikiok
  • 51
  • 1
  • 2

3 Answers3

6

I "npm install"ed 'react-devtools' and 'react-devtools-core' and set them to the same version

   "react-devtools": "~4.14.0",
   "react-devtools-core": "~4.14.0",

and re-installed everything by deleting package-lock.json and node_modules

then ran npm install and it worked

I think the problem was those packages not being the same version

dank
  • 127
  • 8
  • Thank's a lot. I do as you recommended and it's work. I can add plus to you answer, because i don't have enough rating ))) – Antikiok Feb 10 '22 at 07:16
3

I tried to sync both versions by doing the fresh global and local install. But after a long time, the local combination and resolutions for the version worked for me.

I added the following in packege.json as dev depedencies.

  "react-devtools": "~4.24.5",
   "react-devtools-core": "~4.24.5"

And

  "resolutions": {
    "react-native/react-devtools-core": "4.24.0"
  },

Restarted the env, opened yarn react-devtools, and then opened dev menu and select inspect options and it got connected to dev tools and I was able to inspect my UI components in devtools.

Bhagwat K
  • 2,982
  • 2
  • 23
  • 33
1

If anyone else is seeing this dialog: enter image description here

Here is the solution which worked for me on M1 Mac:
Uninstall the homebrew version of react-native-debugger and install the react-native-debugger_0.11.7.dmg binary.

More info here

Vlad R
  • 1,851
  • 15
  • 13