expo start stuck at starting metro - react-native

I have tried everything from restarting computer, reinstalling node modules, checking network issues, but I cannot get the metro bundler to start.
These are my diagnostics, if anyone can help it would be much appreciated
Expo CLI 5.0.1 environment info:
System:
OS: macOS 11.6.1
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.17.4 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.14 - /usr/local/bin/npm
Watchman: 2021.12.20.00 - /usr/local/bin/watchman
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
expo: ~44.0.0 => 44.0.0
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-web: 0.17.1 => 0.17.1
npmGlobalPackages:
expo-cli: 5.0.1
Expo Workflow: managed

https://developer.apple.com/forums/thread/678469
This thread ended up being the right answer. Once I switched the command line location and booted up the ios simulator it also started working on my personal device.

Related

Image Pipeline was not initialized (React Native)

Description
So I installed a library and since then I kept getting this error, I have tried for hours to fix it but it wouldn't work.
Version
0.70.6
Output of npx react-native info
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 AMD Ryzen 7 5700G with Radeon Graphics
Memory: 1.39 GB / 15.87 GB
Binaries:
Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.10.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
Versions: 10.0.19041.0
IDEs:
Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8309675
Visual Studio: 17.1.32414.318 (Visual Studio Community 2022)
Languages:
Java: 11.0.12
npmPackages:
#react-native-community/cli: Not Found
react: 18.1.0 = 18.1.0
react-native: 0.70.6 = 0.70.6
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Download from the repo provided below
Install the packages
And run the command: npx react-native run-android (Only configured for android)
Snack, code example, screenshot, or link to a repository
https://github.com/koen1711/react-native-ble-scala/tree/unstable
I couldn't find anything on the topic, and I am expecting no error.

> Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available

There was apparently a RN outage. This causes so much issues now as I can get a build out.
https://github.com/facebook/react-native/issues/35210
but that "FIX" says to look at https://github.com/facebook/react-native/issues/35210#:~:text=We%20have%20prepared%20releases%20for%20all%20the%20main%20versions%20of%20react%2Dnative%20with%20an%20hotfix%3A
The issue with that is there is no mention of 0.71.0-RC.0 version fix, I am on that version and when I try to run npx react-native run-android, I get the following:
> Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available.
If someone came across this could you please mention how you solved this? I do not understand what the fix is for my situation specifically.
This is what the terminal spits out when I run react-native info:
System:
OS: macOS 13.0
CPU: (8) arm64 Apple M1
Memory: 129.47 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - /usr/local/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.5.5 - /opt/homebrew/bin/npm
Watchman: 2022.09.05.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
Languages:
Java: 11.0.16.1 - /usr/bin/javac
npmPackages:
#react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.0-rc.0 => 0.71.0-rc.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
please let me know if I should add more information.
Just to be sure everyone gets this, yes #Grant Solomons got this right.
So if in your package.json file you have "react-native": "^0.70.0",, delete the ^ it to "react-native": "0.70.0",
Fixed by upgrading my RN version to one of the ones with the patches

React Native Getting this error 'Operator "abs" not found'

I have a project I am working on that built yesterday. Today, I am getting this error 'Operator "abs" not found' as seen in the screenshot below. I am not using expo as the build system though the project does use react-native-reanaminated which keeps coming up in my search for a solution and also in this answer React Native Getting this error 'Unrecognized operator abs'.
I tried the solutions there to no avail. Any guidance would be greatly appreciated.
❯ npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU # 2.70GHz
Memory: 359.10 MB / 8.00 GB
Shell: 3.1.2 - /usr/local/bin/fish
Binaries:
Node: 14.4.0 - /var/folders/rt/7lc5vcw16459dszl8djk35fh0000gn/T/fnm-shell-146260/bin/node
Yarn: 1.22.4 - ~/Github/project5/app/node_modules/.bin/yarn
npm: 6.14.8 - /var/folders/rt/7lc5vcw16459dszl8djk35fh0000gn/T/fnm-shell-146260/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 11.7/11E801a - /usr/bin/xcodebuild
Languages:
Java: javac 15 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
#react-native-community/cli: ^3.0.4 => 3.2.1
react: 16.13.1 => 16.13.1
react-native: 0.63.3 => 0.63.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
❯ qnm react-native-gesture-handler
react-native-gesture-handler
└── 1.8.0
❯ qnm react-native-reanimated
react-native-reanimated
└── 1.13.1
I was able to resolve this by running the following commands.
The first command cleans the ios build in app/ios directory.
The second command resets the simulator. You can also do it from the GUI by clicking Erase All Content and Settings.
❯ cd ios && xcodebuild clean
❯ killall "Simulator" 2> /dev/null; xcrun simctl erase all
Then you rebuild your app as normal with react-native start and open you simulator.

Cannot destructure property `allowedHost` of 'undefined' or 'null'

I am trying to create a new react-native project with Expo CLI Quickstart.
expo start --web command is promoting me the below error on macOS.
Cannot destructure property allowedHost of 'undefined' or 'null'.
I tried https://github.com/expo/expo/issues/5727#issuecomment-533895008 but in vain.
info
React Native Environment Info:
System:
OS: macOS 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU # 2.60GHz
Memory: 599.95 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.10 => 0.59.10
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
Check if you can update expo cli to version 3.1.
The latest version.
npm install -g expo-cli

Print: Entry, ":CFBundleIdentifier", Does Not Exist Eero

Enviroment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i5-8259U CPU # 2.30GHz
Memory: 40.32 MB / 8.00 GB
Shell: 3.2.57 - /bin/sh
Binaries:
Node: 10.10.0
Yarn: 1.9.4
npm: 6.4.1
Watchman: 4.9.0
SDKs:
iOS SDK:
Platforms:
iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: ^16.3.0 => 16.3.0
react-native: ^0.57.1 => 0.57.1
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
If i write:
sudo react-native run-ios
it says
03:43:31: Starting packager... 03:43:41: Starting simulator...
and its stucks here
and if i write firstly
Talha-MacBook-Pro:TusTTS talhasalt$ sudo react-native eject
then
sudo react-native run-ios
I think your xcode are running background on a project that can't be build successfully. Make sure you have opened error free project on xcode(the project can be anything). After doing that see the magic.I don't know why its happening but work for me.