check out this link (running react-native run-ios occurs an error?). it appears to be a problem with the location of
command line tools.
in xcode, select xcode menu, then preferences, then locations tab. select your xcode version from the dropdown and exit xcode.
for any such problem:
- go to
- remove that folder
and you are done..
hope it helps?
in mac: after all, you are getting this issue, there may be a chance of missing the following in system preferences -> network -> ethernet -> select advanced -> proxies
add the following line,
this is how i got the solution,
> rm -rf ~/library/developer/xcode/deriveddata > sudo rm -rf /library/developer/commandlinetools > xcode-select --install > sudo xcodebuild -license accept
xcode > preferences > location > command line tools choose.
simply go to xcode
click on xcode from the top left menu xcode->preferences-> location-> click comman line option and set xcode version.
in my case the sdkroot environment variable was wrong, which referred to an old version of iphoneosxx.x.sdk. (perhaps this would have automatically resolved itself after a reboot?)
you can check by running
echo $sdkroot and verifying that it's a valid path.
i fixed it by updating in .bash_profile:
none of these solutions worked for me. these two similar problems offer temporary solutions that worked, it seems the simulator process isn't being shutdown correctly:
killing simulator processes
- quit the simulator & xcode.
activity monitor, selected
cpuoption and search for
sim, killing all the process shown as result.
- then fired up the terminal and run
sudo xcrun simctl erase all. it will delete all content of all simulators. by content if you logged in somewhere password will be gone, all developer apps installed in that simulator will be gone.
opening simulator before starting the package
open -a simulator; npm start
hopefully a permanent solution is found.
go to xcode preferences
locate the location tab
set the xcode version in given command line tools
now, it ll successfully work.
for me, it turns out that there was an ios system update pending asking to restart the computer. restart and let the update finish solved my problem.
for those like me who come to this page with this problem after updating xcode but don't have an issue with the location setting, restarting my computer did the trick.
i had to accept the xcode license after my first install before i could run it. you can run the following to get the license prompt via command line. you have to type
agree and confirm as well.
sudo xcodebuild -license
in my case the problem was that xcode was not installed.
an update for anybody (like me) who's run into this in xcode 13 -- the
instruments command has been removed.
updating to the latest version of
react-native in your
package.json file will no longer try to use the
you may need to install or set the location of the xcode command line tools.
via command line
if you have xcode downloaded you can run the following to set the path:
sudo xcode-select -s /applications/xcode.app
if the command line tools haven't been installed yet, you may need to run this first:
you may need to accept the xcode license before installing command line tools:
sudo xcodebuild -license accept
or adjust the
command line tools setting via xcode (
xcode > preferences > locations):
- Error Running React Native App From Terminal (iOS)
- Error when running jest on a react native + typescript app (Jest encountered an unexpected token)
- How to avoid error 'Unexpected token <' with a React app when running babel from a CDN?
- Getting Error while Creating a new React App from Terminal
- Error while creating new React app ("You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0)")
- React Native 0.64 won't build iOS app after updating Xcode to 12.5 and iOS to 14.5
- Info.plist file for react native ios app using expo SDK
- React native deploying on iOS device stuck on Running 1 of 1 custom shell script
- React native buttons OnPress does not fire when app running in debug mode
- React Native Ios Error - ENOENT: no such file or directory, uv_cwd (null))
- Paste from clipboard not working with React Native on iOS simulator
- Expo on iOS is constantly refreshing my React Native app on MacOS, caused by Dropbox / iCloud
- Error on archiving react native app in Xcode - Multiple commands produce 'libyoga.a'
- React Native App crashes on android 11 on launch without giving error
- React Native Project Running from Xcode but not from command line
- React Native app works when run from Xcode, but crashes when run with 'react-native run-ios'
- react native app works on debug mode, but not works release mode on ios
- react native ios build succeeds but path to app bundle is wrong
- Can't find variable: _d when running react native app for the first time
- Access Denied Error from protected routes from react app hosted on AWS Amplify
- React native iOS open message app with default text
- React native iOS error - "RCTNetworking.sendRequest not found"
- How to fix React Native App not building for iOS
- Where is console.log output when running app on android real device in react native
- React Native - How to run on iOS device from xcode with DEV = FALSE
- How to keep a background timer running in react native even when app is in the background
- EXPO React Native App Won't Load From Windows
- Open external App from React native App ( Button Click)
- React Native - error running "npm start" and "react-native run-android"
- Console error while running react js sample web app
More Query from same tag
- Updating array using react hooks
- React Multi Carousel - Problem with customButtonGroup
- In the react-rails gem, what's the difference between using the view helper react_component to render versus using ReactDOM.render?
- React does not update style on rerender
- TextField in MenuItem causes nextFocus.getAttribute is not a function
- Unable to render data from API in React, no errors displayed
- Checkbox onchange function is always undefined in React component class
- How to handle multiple components in a loop with React-Redux
- My data not reaching to the backend node server from react server
- How do you call modules dynamically with a namespace import from index file?
- How to use event.preventDefault() when function have arguments
- React how to render array elements once?
- Can not access shallow from global config
- How can I pass array to object in the state in React.js
- Multiple routes from single page in NextJs
- Problem with Layout's CystoscapeJs with React
- Cannot set setstate in reactJS
- How to apply certain layout through out whole app using react router?
- How to apply innerClass style to searchBox in appBase?
- Material UI autocomplete popper custom closes on click
- Height not returned from local storage when refreshing react grid layout
- Onclick an element that changes the state of another element
- Collapse entire table on click with animation
- JSreact render issue
- Function inside JSX, is not returning the elements: ReactJS
- How to change options font size in Material UI Version 5 Autocomplete?
- React Js front end and Express backend - can't load static files properly
- How to remove alert bar notification if input value on submit is not empty?
- react-dom 17.0.0 update error TypeError: init is not a function