-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command PhaseScriptExecution failed with a nonzero exit code #32984
Comments
Seeing the sample problem. Seems like this run script phase fails due to the latest changes made in RCTActionSheetIOS:
When I look at the FBReactNativeSpec header indeed the new property |
I had what appears to be the same issue. Looks to be the same issue as #32951 which shows other people have it too. I am also attempting to run the project via Xcode directly. #32712 solved it for me, which is slated for the |
I do not use nvm but asdf-vm to manage my node versions. What worked for me was to have a look at the |
Cleaning the project and re-running worked for me |
@dehlen, @krlol, @JonnyLinja agreed that cleaning & rebuilding works at least to solve the cancelButtonTintColor issue - it looks like FBReactNativeSpec.h is generated on the fly. Cleaning the build regenerated that file for me. |
After trying out all suggestions and different versions of tools such as XCode, nvm, yarn, node, etc., the only thing that worked for me was to downgrade react native. In package.json:
|
This worked for me https://stackoverflow.com/a/71392772/4030220 This is nothing just an issue with the scheme name for me, in my case my scheme name contains whitespace e.g. "ABC staging", which is not allowed, it got fixed after deleting and creating a new scheme with the name "ABC-staging". in the case of react-native 0.67^, you may need to apply these changes as well
in
then use patch-package using the following command :
this will create a patch file inside the patch folder in root, then you can add in the post-install script in package.json:
This command will run each time a new package is getting added to the project and auto-fix react-native find-node. sh. |
Same issue for 1 week now i couldn't resolve it |
@Amr1440 have you checked my comments, after 2 to 3 days of work I got the solution, the issue may be due to scheme name including special char or need a change in the react-native load script. |
after some hours, uninstall node from brew and installed directly from node website and worked! |
This worked for me: |
Which version of |
If you're getting this with an error about setting the node path, this should fix it.
|
Problem
Podfile
|
I had my root folder name "REACT NATIVE", changing it to "REACT_NATIVE" fixed the error as the folder that contains your react native project cannot contain white spaces |
Cherry-picking 802b3f7 fixed the issue for a dev on my team who was stuck with this issue. |
It worked for me, thank bro |
My problem was that I renamed the index.js root file to index.tsx, if you rename it to index.js it works. 👍 |
I also confirm if you change index.ts to index.js it works |
This comment was marked as spam.
This comment was marked as spam.
this work form me with nvm: first you should uninstall local node :
and then install the latest version of node with nvm :
and now if you run
and then you should set the installed version to default version to do this first clear current default with:
and then set the new default :
and the last is link the node location to
put the printed address :
|
brilliant, after trying a million different suggestions this is the one that worked for me.... thanks! |
thank bro,it worked for me |
In my case, the problem was related to Not having enough space on my mac. |
unsetting the default alias fixed my issue.
clean the build folder then rebuild the project. note : I'm using Xcode 14.0.1 |
I've tried it all and still have problems. |
Great. It worked. But surprisingly it happened only with newer version of React Native. Earlier it used work in that way. |
I am facing the same issue with node version 19 and i deleted the nvm also but none of the solution worked for me. |
you saved my days thanks |
I'v got this issue after I've uninstalled my node binary installed by brew because I use volta's node binary. |
This worked for me removing the space in the name of the root directory worked for me |
Thank you so much. this solution help me out this issue after 1 week stuck |
[Resolved] This worked for me |
Looks like this is a common problem with users who use NVM. I uninstalled NVM and used N instead for managing node versions. https://www.npmjs.com/package/n |
This comment was marked as off-topic.
This comment was marked as off-topic.
permission issue on the mac machine.sudo chown -R $(whoami) /path/to/project solved for me |
This solution worked for me. Initially, I was using Node installed via Brew, but I recently switched to using NVM. That's when I started encountering this issue. However, after running this command, it's now building fine. |
I resolved the issue in this way, and I am using nvm to manage nodes. execute Then no error when I run build on Xcode. |
For me, I find .xcode.env.local and edit version npm for them. |
For me it was the parent folder I had my project in. The parent folder name had a space ("Parent Folder") and once I renamed it to ("ParentFolder") the project built successfully. |
This fixed it for me |
its giving me error |
For me : Showing Recent Issues echo export NODE_BINARY=$(command -v node) > .xcode.env <-- this works rn version 0.75 |
That magically helped me. RN version 0.75. |
If anyone has this issue in RN version 0.73.0: I did everything written in this thread but it only started working when I downgraded to 0.72.17 |
|
Fixed as mentioned here. Closing for now, feel free to open a new issue if necessary. |
Description
I followed the instructions from
https://reactnative.dev/docs/environment-setup
npx react-native init AwesomeProject
npm install
then cd to ios directory and runpod install
then opened the project with Xcode and trigged build. But the build failed and the error is
Command PhaseScriptExecution failed with a nonzero exit code
The project could run properly via the command
npx react-native run-ios
, but could not be built on Xcode, I tried on two different Macbook and got the same error.Version
0.67.1
Output of
npx react-native info
System:
OS: macOS 11.6.2
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 126.16 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.3 - ~/.nvm/versions/node/v14.18.3/bin/node
Yarn: 1.22.15 - /opt/local/bin/yarn
npm: 6.14.15 - ~/.nvm/versions/node/v14.18.3/bin/npm
Watchman: 2022.01.24.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7784292
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: 11.0.13 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.1 => 0.67.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
npx react-native init AwesomeProject
npm install
then cd to ios directory and runpod install
then opened the project with Xcode and trigged build
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: