Home > database >  React Native iOS build failed after react native upgrade
React Native iOS build failed after react native upgrade

Time:06-29

Upgraded the react native app from v0.65.1 to v0.67.0. The build failed with the below error. Tried deleting the node modules, pods and installed them again and still facing the issue. The Xcode version is 13.4.1. enter image description here

CodePudding user response:

May be Xcode is using an outdated version of Node (in my case, it was because I use nvm to manage my Node versions, but Xcode used an old version of Node that I had installed via HomeBrew a long time ago).

By default, Xcode will use the Node binary located at /usr/local/bin/node. Check its version by running:

/usr/local/bin/node -v
node -v

If the first command outputs an older version of Node, simply delete it and replace it with a symlink to the newer one:

rm -rf /usr/local/bin/node
ln -s $(which node) /usr/local/bin/node

CodePudding user response:

The solution to the error was easy. Checked the path to the project folder. The folder name has a space in-between. Renamed the folder by removing all the spaces in-between. Tried to run the project and it worked. Not sure why it ran with this fix.

  • Related