1

I have recently upgraded my react native project from 0.62 to 0.68. New Architecture set up has be implemented in android and the code is working fine. But when i try to upgrade the new architectural changes for iOS, but code doesn't run at all. Everytime i get

  Command PhaseScriptExecution failed with a nonzero exit code 
  FBReactNativeSpec.build/Script-46EB2E00014D80.sh

React-Native documentation https://reactnative.dev/docs/next/new-architecture-app-intro isn't helping me at all in building my ios code.

I have tried creating new react native sample projects, but even those projects are also not working with latest architectural changes.

I have tried all the solutions out there.

Can anyone please help me in the upgradation steps for iOS.

Madhu
  • 869
  • 1
  • 17
  • 37
  • 1
    Can you provide more informations ? But it might be a package that is not yet supported with react-native 0.68 – lmasneri Jun 22 '22 at 14:17
  • If using nvm, executing the following seems like a common fix: nvm unalias default. Reference: https://github.com/react-native-community/upgrade-support/issues/161 – Aleksandar Zoric Jun 22 '22 at 14:31
  • I was getting error in RCT-folly library time file, when i commented this line typedef uint8_t clockid_t; error was gone, then i have updated all the pod projects version to ios 12. The only error which i'm facing right now is FBReactNativeSpec. I'm breaking my head from last three days. – Madhu Jun 22 '22 at 15:32
  • @AleksandarZoric I'm not using nvm at all. But i just did installed it, to see if that makes any difference. – Madhu Jun 22 '22 at 15:34

1 Answers1

0

If anyone facing the FBReactNativeSpec issue with latest react native version 0.68 after upgrade, comment this line from node_modules > react-native > scripts > find-node.sh

# # Define NVM_DIR and source the nvm.sh setup script
# [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"

# # Source nvm with '--no-use' and then `nvm use` to respect .nvmrc
# # See: https://github.com/nvm-sh/nvm/issues/2053
# if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
#   # shellcheck source=/dev/null
#   . "$HOME/.nvm/nvm.sh" --no-use
#   nvm use 2> /dev/null || nvm use default
# elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then
#   # shellcheck source=/dev/null
#   . "$(brew --prefix nvm)/nvm.sh" --no-use
#   nvm use 2> /dev/null || nvm use default
# fi

Code started working after it. Also please do check your .bashprofile and .zrsh profile remove nvm path if found from these files also.

Good Luck

Madhu
  • 869
  • 1
  • 17
  • 37