react-native-debugger: React Native Debugger doesn't use the global react-devtools version and still shows 'Unsupported' error
Hello all,
I’m having trouble using react native debugger. I get the ‘Unsupported’ error telling me to downgrade to 4.11.0.
After I ran npm i -g react-devtools@"4.11.0", it installed the react-devtools@4.10.4 version globally. I checked that with npm list -g and it was installed correctly.
The issue is that even though I have the react-devtools version 4.10.4 installed globally, I still see the same ‘Unsupported’ error message.
In the react native debugger app, the DevTools header still indicates version 4.13.4-51ebccc374 which I guess was installed by default when I installed react native debugger.
It seems that React Native Debugger doesn’t use the global react-devtools version.
I installed react native debugger with homebrew: brew install --cask react-native-debugger
I already tried uninstalling react native debugger, react-devtools and reinstalling everything again. With no success though…
Any ideas what else can I try ?
React Native Debugger app version: 0.11.9 React Native version: 0.62.2 Platform: iOS Operating System: macOS Big Sur 11.4 Homebrew version: 3.1.9
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 22
- Comments: 31 (2 by maintainers)
Exact same as @anttiabel. I am making a new issue as it seems to be re-broken.
EDIT: Changing to use the resolution of the version that RND is using fixed this issue:
DO NOT upgrade to 4.22.1, remove all of those and just add this resolution (in my case with yarn workspaces to the package.json that contains the RN project).
for anyone who still find solution Note: I’m running
MacOS 10.15.7 (19H114)first download react-native-debugger. Then you must open it at least 1 time
The “Unsupported DevTools backend version” error persists for me, having tried everything listed. The tool seems bent on using react-devtools 4.14.0-d0ec283819 no matter how I try to upgrade to 4.22.1 everywhere for both react-devtools and react-devtools-core. I am working on an Expo project, on a Mac.
@jack-ayoka I can describe what I did.
in your package json add resolution
yarn/npm install - it will change in yarn.lock/package-lock file version of react-dev-core
install globally react-devtools if you don’t have
paste command from RN debugger which you receive in terminal and execute.
This was exactly the fix that worked for me. Thanks!
@Arkan4ik what error did you got from running application?
Here is another method:
"react-devtools-core": "^4.13.4"to resolutions of package.json.For
npmlovers, you can add a"preinstall": "npx npm-force-resolutions"script on your package.json. This will force the resolutions found on your package.json. More info here. Once you do annpm iyou should see if thereact-devtools-coreis set to4.14.0(command:npm ls react-devtools-core) if not, do anothernpm iand it should resolve it to4.14.0This worked for me. Started a brand new RN app, using CLI. Debugger showed version mismatch error. Added the resolution to
4.14.0. Ranyarn install. Rebuilt app. Debugger works.For npm, simply add
Please see the release note:
Note about React DevTools
If you got
Unsupportedmessage or some errors from React DevTools, please read thedocumentationfirst.Question: I got
Unsupportedmeesage from React DevToolsIf you’re using React Native version >= 0.62 and keep React Native Debugger as the latest version, here is what you can do:
In your app project, upgrade
react-devtools-coredependency to match the React DevTools version:yarn upgrade react-nativereact-devtools-coreblock in yarn.lock, then re-install dependencies byyarnWhy is every comment suggesting to pin to something like
4.14.0when the error message says<4.11? Is the error message wrong and the requirement is rather>4.11?I’m really confused by this error message.
For me the error never went even if i added the below and did a npm i (expo project) and also i tried all possible solutions as well with NPM
So i created a new expo project with
yarnnow instead ofnpmand added the above inpackage.jsonand runyarn installandyarn startsurprise react native debugger worked with the Unsupported error (Tested only in android)After banging on this for hours yesterday, this worked!!! thank you so much! Do note, i also had to uninstall react-devtools and react-devtools-core from my local project. so the only thing referencing react-devtools locally was react-native, and the ‘resolutions’ section.
Seems like https://github.com/jhen0409/react-native-debugger/pull/706 is the PR to fix this by upgrading
react-devtools-coreinreact-native-debugger.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
This worked for me! I was using npm and switched to yarn. I had to
rm -r node_modulesandrm -r package-lock.jsonand doyarn install(npm i -g yarnif you don’t have yarn yet) and surprisingly it worked!Same for me as @anttiabel