I have the following warning when running react-native run-ios:
I know that the question was asked before, but the solutions doesn't seem to work for me... I restarted my OS and it's still not working...
Any ideas?
As I noted in the comments, you can check this github link
The workaround from that thread that seems to work consistently (at least in my case) is to do these steps:
In the current terminal: react-native start
In another terminal: react-native run-android
The issue now is with the current version of react-native: 0.45.0.
I downgraded to the 0.44.0 version with react-native-git-upgrade 0.44.0 and it works fine now!
Related
TypeError: global.__reanimatedWorkletInit is not a function. (In 'global.__reanimatedWorkletInit(_f)', 'global.__reanimatedWorkletInit' is undefined)
I am using React Native (not expo). I don't even have reanimated downloaded. I had it downloaded then I removed it and rebuilt the app, and it's giving me this error now.
Things I've tried:
deleting node_modules and re-running yarn install
-git reset HEAD~ to a prev commit where I didn't install the reanimated2 packages
I just followed the below steps to solve this issue.
step1: npx react-native run-android
step2: npm start -- --reset-cache
and it solved
Ok, what I ended up doing to solve this was:
-just deleted the whole repo from my local
-cloned it again from github
-uninstalled the app from Android emulator
Then it seemed to work. So maybe it was an error related to cache or something lingering around even after I had removed all instances of the word/package "reanimated" from the whole codebase.
Using Expo in a bareworkflow
Clear app memory
run expo start --dev-client --clear
I solved my issue doing this:
https://github.com/wcandillon/react-native-redash/issues/395
On top you just have to do this: import 'react-native-reanimated';
on your app or index file.
I have tried all the solutions from stack Overflow. (Not working)
Here is the fix:
first check your version for react-native-reanimated and then see the actual documentation of the right version for the configuration.
I am using version 2.4.1 and have solved by this link
I had a require cycle warning from a git submodule inside the src folder which I thought wasn't doing any harm but turns out fixing that solved this issue. I am unsure why the require cycle was causing so much grief but I guess if you've got a require cycle in your output try solving that and it may fix this.
What I did was degrading react-native-reanimated to ^2.6.0. It solved the issue for me.
I had this problem too and simply moved the babel plugin react-native-reanimated/plugin to the last place in the babel's config as stated in the doc.
I should probably mention it worked for me before but when I started migrating the react-native app for web this was the problem for me. I am using expo. I had to run expo with --clear CLI arg as expo start --dev-client --clear.
I Just solved this issue by doing these steps:
close Metro bundler
run this command
npm start -- --reset-cache
react-native start --reset-cache
rebuild the project again
I've tried looking for a way to solve this error. It's occurring to me while I try to install my app with react-native run-android.
Already took a look at the solutions from this thread, but my project isn't named native, ./gradlew clean from the android folder didn't work, and I tried deleting the .gradle folder. I've also tried my own simple solutions that sometimes work for whatever reason - uninstalling the app from my phone before re-running react-native run-android and reopening VSCode.
This error started occurring after I installed react-native-unimodules, following the android instructions. A potential problem I see from this is just that react-native-unimodules is supposed to be for Expo and I'm doing things with React Native CLI, but from what I understood, this is allowed.
My react-native version is 0.61.5, react-native-cli is 2.0.1.
Edit:
build.gradle file, as requested.
Also, I don't know if it's relevant, but since it was part of one of the suggested answers, I'll mention this as well: in the gradle.properties file,
android.useAndroidX=true and android.enableJetifier=true were already present.
This is a pretty common case, but what ive figured out during my app building, these steps always helped.
First you need to add below lines in gradle.properties file
android.useAndroidX=true
android.enableJetifier=true
Then after that you need to install, jetfier via either yarn or npm like :
npm i jetifier // first this then the below
npx jetify
After that again re-bundle your code and then run, hope it helps. Feel free for doubts
Good Day, I am pretty new to react native and I ran into an issue, my metro bundler starts and gets stuck at loading dependency graph with ('...'), not moving forward or backwards
I have tried using yarn start, changing the ports although my port 8081 is free.
Any other suggestions would be appreciated.
EDIT: any other alternatives to metro bundler?
Screenshot:Its just stuck here
Screenshot II: Emulator
Turns out it was my node version, was using v12, I downgraded to v10.
Thanks for your suggestions.
Did you run react-native run-ios or react-native run-android as well?
because react-native start only runs metro and usually when dependency graph is done it stays there hanging until you connect a simulator/device but it is working as expected.
You can try with react-native --reset-cache to clean up metro after some bad start, but in any case this only starts metro bundler. To get device running use the methods above
For the latest version of RN 0.62, there could be two things that could be wrong.
Make sure your node version is < 12.15 since there is a memory leak issue and you would have few issues running the bundler.
If you are in MacOs Catalina , just go to the Security & Privacy -> files & folders in the system preferences and change the permissions for watchman.
The simplest way to debug this issue is running the bundler in sudo
sudo react-native start
And if you have permission issue with watchman then you should see bunch of errors in your console.
When I run a new react-native app in Android device I am getting this Error:
undefined is not a function (evaluating 'transform.forEach')
I had
node version 7.9.0
react-native-cli version 2.0.1
react-native version 0.44.0
npm version 4.2.0
I use Windows 10 (64 bit).
After six hours spent debugging react proptype validation and then digging a level deeper into packaging internals, I figured out a brain-dead simple solution:
react-native start --reset-cache
I've read a lot and tried all different answers, but after days trying, here is what works:
- Run terminal in admin mode (I'm under windows)
- Change the directory to another with a shortest path
- Change the directory to outside dropbox
- Pushed the code from GIT (starting from zero)
I can't say what step is the responsible, but it's a little effort to do everything in the same time... And it worked!
I just started a new react-native project using react-native init myApp.
Then I started it up cding into the folder and running:
react-native run-ios
The webserver start's up and the simulator also.
When I change the index.ios.js file, for example the welcome text to something else, then hit CMD+R, the simulator refreshes but the new welcome text I inserted doesn't show.
I have tried to run react-native run-ios for every change but also with no success.
I'm on macOsx sierra 10.12.1 and react-native 0.38.0.
The simulator is running ios 10.1
Does anyone have any guess what might be wrong?
Thank you
I had the exactly same version and problem. I finally got it working by deleting the <PREFIX>/var/run/watchman/<USER>-state folder and running watchman version which recreated that folder. If you installed watchman with Homebrew I believe it's /usr/local/var/run/watchman/<USER>-state.
Hope this works for you.