React Native Debugger "Unsupported DevTools backend version" - reactjs

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?

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

If anyone else is seeing this dialog:
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

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.

Related

Expo no longer working? bash: expo: command not found

so I am working on some React Native projects and up until now, Expo has been working great along with Android Studio. However, I think I updated my graphics card drivers a couple of days ago. Now when I try to run "expo start" I receive a "bash: expo: command not found" error.
Any ideas? I keep seeing all this stuff about adding NPM global to my paths but all of those issues/solutions seem to be for Mac. I have no idea how to go about correcting this on a Windows 10 machine. Any thoughts?
expo is not installed on the machine anymore for some reason
since it is an expo project it is straightforward first go to Nodejs webpage
download LTS version NOT THE CURRENT VERSION once node is succesfully installed on the machine it will you can check by opening the command prompt and typing node --version
you should see something like "14.1232."
then run this command npm install -g expo-cli it should install expo again globally
navigate to your project folder and do "expo start" it should work

Error: "createRequire is not a function Referenced from: BaseConfig"

I have a freshly cloned repo created from the create-react-app template. I npm install to install the packages and then npm start to serve the files on localhost:3000. My coworker (the repo creator) is not having any issues.
However, I see the page flash for a second and then I get the following error:
Failed to compile
createRequire is not a function
Referenced from: BaseConfig
The error message doesn't provide any other information to help trace which file it could be coming from.
I've tried the following to troubleshoot:
Deleting node_modules and package-lock.json and re-installing
Deleting the entire repo and re-cloning
Searching for 'createRequire' or 'BaseConfig' in project files found no results
Searching online for similar issues. None seem to have the same error I'm encountering.
Other details:
npm version 6.14.8
react version 17.0.1
Any idea where this error could be coming from or what steps I can do to trace it?
TL;DR Needed to upgrade node version
I tried npx create-react-app to confirm if the issue was with the template or with the project code. While doing that, I got a message that my package dependencies required a higher version of node (I was on v.10.4, the latest is v15.2.0).
Doing brew upgrade installed the latest version but didn't change the default node version across the system (ie: node -v still showed v10.4) but
doing nvm install --lts then nvm alias-default [latest-version] fixed my issue!
Some solutions are not worked for me. I uninstalled node.js and installed latest version. It worked!
It could be connected with eslint in create-react-app
try to reinstall 'eslint' or 'eslint-config-react-app'
https://github.com/AtomLinter/linter-eslint/issues/1351
BaseConfig is a variable of the create-react-app react-scripts module
in node_modules/react-scripts/config/webpack.config.js
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
resolvePluginsRelativeTo: __dirname,
// #remove-on-eject-begin
ignore: isExtendingEslintConfig,
baseConfig: isExtendingEslintConfig
? undefined
: {
extends: [require.resolve('eslint-config-react-app')],
For me, downgrade the react-scripts to latest 3.x version solved my problem. I could not update the NodeJS version, as I didn't have access to NodeJS server instance. Seems it fits better with React 16.x.
I'm running and building the app at NodeJS V10.0.0.
I am a noob, but I just came across this very same error message in picking up where I previously had left off following a MERN stack tutorial. During the break, I must have switched nvm versions, and thanks to this thread I was able to correct this. From the terminal, I simply ran nvm list. From the result, I could see that I was running an older version (10.9.0) but had a newer one (10.12.0) available to me, which I switched to by running nvm use 10.12.0. This resolved my issue.

React-native-reanimated: Unable to resolve "./useValue"

I am trying to build a react native app. I have caught an error on the terminal saying
Unable to resolve "./useValue" from "node_modules\react-native-reanimated\src\Animated.js"
I reinstalled react-native-reanimated to the expected version range.
`Some of your project's dependencies are not compatible with currently installed expo package version:
react-native-reanimated - expected version range: ~1.9.0 - actual version installed: ^1.10.1
Your project may not work correctly until you install the correct versions of the packages. To install the correct versions of these packages, please run: expo install [package-name ...]`
Thus, I run the code as follow: npm install react-native-reanimated#1.9.0, but still run into the error code.
I could realy use some help on this.
try uninstalling the package ==> close ide (all instances) ==> open the ide ==> install the package again ==> run "expo start -c"
Only do this:
expo start --clear
From Expo Documentation at Expo Start command.
--clear, -c | Clear the React Native Packager cache.

React native expo not running in Simulator

I am getting below error while running application in simulator.
I tried to restart server but not work for me
I got the same issue, solved by below steps
Update expo version by npm install -g expo-cli
Restart server
Run application
For me,
Previous Expo version : 3.11.7
Updated Expo version : 3.18.0
Hope it helps

React Native "The expo SDK requires Expo to run. .... this code is not running on Expo."

I am coding with React Native. I don't see that when I first create react-native app for check running. When I implements my code see that. My purpose is generate apk.
app.json
build.gradle
index.js (index.android.json)
App package.json
Solved
Result: I solved my problem with npm install. I would like say many month after.
If anyone's getting this error after upgrading Expo, try restarting your simulator - that fixed it for me.
Here is my experience if someone using expo sees those error message.
I accidentally installed expo manually in my project which was version 29.0.0.
I was using version 28.0.0 of expo sdk, so it may have crashed inside.
What I did:
manually upgrade sdkVersion of app.json to 29.0.0.
change sdk version to 29.0.0 for react-native.
Had exactly the same error - fresh machine, fresh npm, only one version of expo installed.
Turns out, expo requires you to build it as an app before it can send it to the expo app properly (at least on Android). This is easiest done by:
Adding an "android" section to app.json, with the contents "package": "uk.co.yourcompany.yourpackagename" (this is required by android packages. It can be complete garbage, but should follow that format - a backwards domain name)
running expo build:android and following the instructions to sign up to expo's servers and build the app
then restarting expo start
Not sure if this is documented anywhere though, so may be a new thing?
Another thing to try is to move your node_modules folder away (or maybe delete it, up to you) and re-run npm install
According to the official tutorial: https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html
If you want to use expo in your application, you must create it in the following way
npm i -g create-react-native-app
create-react-native-app my-project
cd my-project
npm start
This will start the React Native packager and print a QR code. Open it in the Expo app to load your JavaScript.
as I see your code has files that are not necessary, such as build.gradle and index.js, the structure that create-react-native-app creates is different and easier to use
I was getting the same error after updating the expo-cli to version 3.0.6.
By looking at my package.json I noticed the expo-cli version installed on my computer is not the same as package.json. so I changed it to "expo-cli": "^3.0.6" and ran npm install || yarn, then the error disappeared!

Resources