Archive failing in XCode 16

I am getting this error while archiving the app. This is happening after upgrading to the latest macOS Sequoia and XCode 16.

getting this error.

env: node: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code

It was working when I was in XCode 15.4.

My React Native version: 0.71.3

Note: Notices some change requests from stack overflow threads for .xcode.env file.

Archive failing in XCode 16
 
 
Q