React native app not building IPA

After upgrading to Xcode 15 my react native project failed to build IPA.But it's working fine while i run through simulator.

I am getting the following error.

Command PhaseScriptExecution failed with a nonzero exit code

PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images

Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:68:19) at Object.createHash (node:crypto:138:10)

React native app not building IPA
 
 
Q