error build: Command PhaseScriptExecution failed with a nonzero exit code

I am in process of migrating React Native 0.68 project from intel silicon/Xcode 13/12.15 to M1 silicon/Xcode14/12.15. However the build of the project throws above error. I did under iOS pod deintegrate and pod install but it didn't help. There is no entry under excluded architecture in build setting.

error build: Command PhaseScriptExecution failed with a nonzero exit code
 
 
Q