Open ashish3303 opened 3 years ago
The same issue... Any ideas?
Same issue there. Trying to troubleshoot it for the past 2 days, but still no luck...
Are you using nvm? I had the same problem and as suggested at https://github.com/react-native-community/upgrade-support/issues/138#issuecomment-855462806 nvm unalias default
fixed it.
There is a script that searches for the node executable to use for building things, and somehow it gets messed up or chooses an incompatible version. But still seems like a bug to me...
Same issue, been stuck on this for days, I do not have nvm installed. Any ideas?
xcode 13, RN 64.2
Thanks @phlmn, nvm unalias default
fixed it for me also.
Are you using nvm? I had the same problem and as suggested at #138 (comment)
nvm unalias default
fixed it.There is a script that searches for the node executable to use for building things, and somehow it gets messed up or chooses an incompatible version. But still seems like a bug to me...
You saved my life... nvm unalias default
fixed it.
Thanks @phlmn,
nvm unalias default
fixed it for me also.
Worked for me, Thanks 😍
Are you using nvm? I had the same problem and as suggested at #138 (comment)
nvm unalias default
fixed it.There is a script that searches for the node executable to use for building things, and somehow it gets messed up or chooses an incompatible version. But still seems like a bug to me...
This worked for me as well.
"nvm unalias default" did NOT fix the issue for me in Xcode 13.2. I still get: "Command PhaseScriptExecution failed with a nonzero exit code" with no other information. For reference, I followed the iOS steps here: https://reactnative.dev/docs/environment-setup
I can run the node app from within VSCode. When I launch it from a second terminal in there, it loads the simulator but doesn't actually run the app on it. When I launch it from the Xcode workspace with a clean build folder, the above error happens repeatedly.
nvm unalias default works for me. I have ran it then re-installed pod and build app via xcode. FBReactNativeSpec problem fixed. I have other erros now but I think it relate to something else.
Are you using nvm? I had the same problem and as suggested at #138 (comment)
nvm unalias default
fixed it.There is a script that searches for the node executable to use for building things, and somehow it gets messed up or chooses an incompatible version. But still seems like a bug to me...
Great. thanks.
Hello, volta user here.
I resolve this issue by exporting NODE_BINARY
in every script that execute node, in my case I define it in FBReactNativeSpec
and Build Phase for Bundle React Native code and images
Hello, volta user here. I resolve this issue by exporting
NODE_BINARY
in every script that execute node, in my case I define it inFBReactNativeSpec
and Build Phase forBundle React Native code and images
@adeyahya it works for me. Thanks!
I lost half a day trying to solve this. I have no idea why this started happening all of a sudden for a specific project while other projects run, but in my case I had to run this:
nvm alias default 14.17.0
Remove nvm worked for me.
I had to remove nvm because I'm not using nvm as my node manager. So I had to brew uninstall nvm
and it worked.
I am not using nvm and was running into the same error. Deleting the piece of code that looks for nvm find-node.sh
in node-modules/react-native/scripts
solved this issue for me
I found @donalbertico 's advice worked for me.
I see the PR with the latest changes to find-node.sh
was merged & released in RN v0.67.2 ~so downgrading to v0.67.1 should allow everything to run again without manual file edits.~
Edit: I tried RN v0.67.1 with the old version of the file & still found that step was failing. (The problem is once you get a successful build you need to clean your build folder to test other configurations or it will just succeed.)
For me it was just having a space in folder name which was in the path of project folder from root.
I also got this error none of the above sol solve it React Native 0.68.2 (also try other versions too) xcode 13.2.1
Hello, volta user here. I resolve this issue by exporting
NODE_BINARY
in every script that execute node, in my case I define it inFBReactNativeSpec
and Build Phase forBundle React Native code and images
@adeyahya it works for me. Thanks!
I'm confused about this solution - doesn't this involve manually changing a script that's generated in the Pods?
In my case, the build is failing on CI (CircleCI via fastlane), so how would I manually override a Pod script?
my solution was delete nvm via brew
brew uninstall nvm
After trying all this with no success, upgrading to RN 0.70.5 and fixing all build errors after that fixed the issue and compiled successfully.
Uninstall nvm
was my solution.
Just remove the folder, usually ~/.nvm
So at this point are we to understand that:
I had to comment out content of find_node function inside FBReactNativeSpec [CP-User] Generate Specs script and manually set NODE_BINARY variable inside same function.
P.S. I am using nvm
@AnuragTiwari1 I can't find any find_node function in my code.
For me it was just having a space in folder name which was in the path of project folder from root.
That did it for me!
may be unrelated but this also fails on ionic+angular+capacitor build via fastlane on iOS. Fix is to search/replace all readlink xxx
to readlink -f xxx
in the Pods/…/Pods-App-frameworks file, but I have to do that pretty often.
I don't know enough to tell if this is caused by fastlane, angular, XCode, Pods or something else :thinking: but it IS reverted after npx cap sync ios
and that runs pod install
in the ios/App
directory - THAT is what rewrites the files back to only "readlink" with no -f :thinking:
Wonder if that would point to Pods as the source for this?
For me it was just having a space in folder name which was in the path of project folder from root.
OMG. This fixed the issue I am facing for days already!!!! THANK YOU SO MUCH!
Hi,
I have got this error when I trying to run the build using Xcode -
/Volumes/Data/Projects/ReactNativeProjects/testP/node_modules/react-native/scripts/generate-specs.sh: line 27: readlink: command not found /Volumes/Data/Projects/ReactNativeProjects/testP/node_modules/react-native/scripts/generate-specs.sh: line 27: dirname: command not found /Volumes/Data/Projects/ReactNativeProjects/testP/node_modules/react-native/scripts/generate-specs.sh: line 27: cd: : No such file or directory Command PhaseScriptExecution failed with a nonzero exit code
I tried everything as below but nothing happens -
But still having the same issue with the build.
And when I run the react-native run-ios command in the terminal then I got this issue:
The following build commands failed: PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/prologiciosdeviosdev/Library/Developer/Xcode/DerivedData/testP-bngsipncomaqjaevntyfingdcigq/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-3805B1ED96D1BF469DDC8CE1A1B7C610.sh (1 failure)
Versions
Thanks