I deleted nvm from my mac (I deleted the ~/.nvm-folder), and I installed node through the installer from their website.
I have a React Native project I want to build in XCode, but I get the following error:
Node found at: /Users/username/.nvm/versions/node/v18.19.1/bin/node
/Users/username/Library/Developer/Xcode/DerivedData/app-gnvlyyajukhnelhalqtfeuwftjrn/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/hermes-engine.build/Script-46EB2E0002AB40.sh: line 9: /Users/username/.nvm/versions/node/v18.19.1/bin/node: No such file or directory
I think somewhere in XCode/my project, the old path of node (nvm) is still persisted. What I did so far:
export NODE_BINARY=/usr/local/bin/node to .zshrc -> didn't work/usr/local/bin/node -> this symlink already exists, didn't workWhere to set this node path?
There is a environment for local saved at react-native-project/ios/.xcode.env.local:
export NODE_BINARY=/Users/mac/.nvm/versions/node/[old version]/bin/node
Edit the version number:
export NODE_BINARY=/Users/mac/.nvm/versions/node/v20.15.1/bin/node
If you want to know the current version number, then check current node path by type command -v node on terminal:
reference: React Native - FBReactNativeSpec Command PhaseScriptExecution failed with a nonzero exit code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With