.xcode.env
# This `.xcode.env` file is versioned and is used to source the environment
# used when running script phases inside Xcode.
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.
# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_BINARY variable here.
# For example, to use nvm with brew, add the following line
# . "$(brew --prefix nvm)/nvm.sh" --no-use
export NODE_BINARY=$(command -v node)
We have a react native project. Our node installation is managed with asdf-vm. When I run the command as a user command -v node
and which node
I get the correct path returned to me as follows:
> which node
/Users/devboi/.asdf/shims/node
> command -v node
/Users/devboi/.asdf/shims/node
But when run the same commands as a yarn script
"scripts": {
"nodePath": "which node",
"nodepath": "command -v node"
},
➜ yarn nodePath
/private/var/folders/gs/hrtylh996mv147w1xqzdm2fm0000gn/T/xfs-407a6ad6/node
➜ yarn nodepath
/private/var/folders/gs/hrtylh996mv147w1xqzdm2fm0000gn/T/xfs-5833b283/node
The reason I ask about this is that when we generate our .xcode.env.local
from the config set up by the .xcode.env
file the temporary paths with private
are the ones being written to the .xcode.env.local
files. I have seen people using nvm
has run into the same issues, but I haven’t seen any clear solutions.
What am I missing? Some config of yarn? Or an export somewhere?