aws-sdk-js-tests
                                
                                 aws-sdk-js-tests copied to clipboard
                                
                                    aws-sdk-js-tests copied to clipboard
                            
                            
                            
                        Repeat runs of `yarn start:ios` throw `node: No such file or directory` build failure
Describe the bug
The start:ios often fails with node: No such file or directory and requires git clean -dfx
Steps to reproduce
Run yarn start:ios multiple times, and the failure will be thrown on repeat runs
Observed behavior
    export variant\=normal
    /bin/sh -c /Users/trivikr/Library/Developer/Xcode/DerivedData/reactnative-eqkrfboelosvurbnaxhvcfnygpim/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/hermes-engine.build/Script-46EB2E00012C50.sh
Node found at: /private/var/folders/nr/2sgyvkh90211_mks7zqd_xsw0000gr/T/xfs-b77f61c5/node
/Users/trivikr/Library/Developer/Xcode/DerivedData/reactnative-eqkrfboelosvurbnaxhvcfnygpim/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/hermes-engine.build/Script-46EB2E00012C50.sh: line 9: /private/var/folders/nr/2sgyvkh90211_mks7zqd_xsw0000gr/T/xfs-b77f61c5/node: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'reactnative' from project 'reactnative')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'reactnative' from project 'reactnative')
warning: Run script build phase '[CP-User] [RN]Check rncore' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Fabric' from project 'Pods')
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:313B9D11-B80F-4349-A716-183C123799F1, OS:17.5, name:iPhone SE (3rd generation) }
{ platform:iOS Simulator, id:313B9D11-B80F-4349-A716-183C123799F1, OS:17.5, name:iPhone SE (3rd generation) }
** BUILD FAILED **
The following build commands failed:
        PhaseScriptExecution [CP-User]\ [Hermes]\ Replace\ Hermes\ for\ the\ right\ configuration,\ if\ needed /Users/trivikr/Library/Developer/Xcode/DerivedData/reactnative-eqkrfboelosvurbnaxhvcfnygpim/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/hermes-engine.build/Script-46EB2E00012C50.sh (in target 'hermes-engine' from project 'Pods')
(1 failure)
Expected behavior
No issues with finding NODE_BINARY, and build is successful.
Additional context
This issue was faced during React Native 0.73.x update in https://github.com/aws-samples/aws-sdk-js-tests/pull/190#issuecomment-2244125437, and was temporarily resolved by switching to nvm for managing Node.js versions