I\'ve build a react-native application and suddenly I get this error message on my terminal during run of the command react-native run-ios. The same code work fine 10 minute
I had the same error, but it was caused by the package manager process port being already used (port 8081).
To fix, I just ran the react-native
by specifying a different port, see below.
react-native run-ios --port 8090
In my case, the issue was with my Xcode build scheme. When you run react-native run-ios
you may see something like,
info Found Xcode workspace "myproject.xcworkspace"*
info Building (using "xcodebuild -workspace myproject.xcworkspace -configuration Debug -scheme myproject -destination id=xxxxxxxx-xxxxx-xxxxx-xxxx-xxxxxxxxx -derivedDataPath build/myproject")*
In this case, there should be a scheme named myproject in your ios configurations. The way I fixed it is,
Double clicked on myproject.xcworkspace in ios directory (to open workspace with Xcode)
Navigate into Product > Scheme > Manage Schemes...
Created a Scheme appropriately with name myproject (this name is case-sensitive)
Ran
react-native run-ios
in project directory
Here is the a possible solution
The problem is found in RealmReact.xcodeproj
cd ios && rm Podfile.lock && pod install
worked for me.
For me it caused by installing react-native-vector-icons and linking by running the react-native link react-native-vector-icons
command.
I just unlinked the react-native-vector-icons by following commands
react-native unlink react-native-vector-icons
cd ios
pod install
cd ..
react-native run-ios
As I already installed an other icon library.
If you don't have cocoa pods installed you need to:
sudo gem install cocoapods
Then run:
cd /ios
pod install
delete the build
folder in ios
folder of your react native project
run:
react-native run-ios
if error persists:
build
folder again/ios
folder in Xcode