Using NVM Node from XCode

If you try to use an nvm install of node from XCode, for instance in React Native using Sentry, you will likely get the following build error: env: node: No such file or directory This is because XCode uses a sanitised version of the PATH, and your .profile will not be used, so anything in there to adjust your PATH will not work. /usr/local/bin is on your path, so my solution to this is to create a node script that uses the default version, or the one in .nvmrc if available. ...

December 9, 2022 · Nigel Sim