I encountered this error in the context of a React-Native project running on iOS. I did several things so it's hard to know which one fixed it:
- Make sure you don't have errors in your bash or zshrc profile -> I had a error related to my jdk. You will know if when opening a terminal window it shows an error/warning
- Make sure you don't have spaces in the path
- If you are using Firebase, make sure your GoogleService-Info file is in the ios folder and not in the ios>project folder
- **Do not keep the project in an iCloud folder**, especially if you are low on space. I suspect this was a big factor for mine
Finally, my worked when doing these and **running react-native 0.67.2**. The newer version on it's own didn't fix it, I had to do at least one of these other assertions to get it working.
Things to consider:
- Running the project in Xcode will usually give you more insight into the problem
- Clearing the Xcode build folder wasn't enough on it's own to fix it but when trying a potential solution it is important you do it (and potentially also `pod deintegrate && pod install`) to make sure there are no traces of the previous ios build.
- I am running node version 16.13, running node 17 gave me different errors and I wouldn't recommend it to date.
I am running macOS Monterrey and Xcode 13.2.1, but I tried on BigSur and also Xcode 12.5.1 and the still got the error.
For react-native, this error is discussed in length here:
[To see links please register here]