In bitrise , IOS build was failed, Command PhaseScriptExecution failed with a nonzero exit code

whenever i try to build my react native app for IOS build, it is giving below mentioned error in bitrise virtual machine (apple silicon, silicon node default version is 18). but when i try to build using my local machine (apple intel, intel node default version is 16) it is working perfectly fine.
this is the error screenshot in bitrise

this is my ios build script

``#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

# Set NODE_OPTIONS environment variable for iOS build
export NODE_OPTIONS=--openss1-legacy-provider

# write your script here
find . -type l -exec test ! -e {} \; -delete

#.env update

replace_env_var () {
  sed -i '' "s~$1=.*~$1=$2~g" .env
}

replace_env_var "ENV_DISPLAY_NAME" "v$EURECAB_EM_VERSION"
replace_env_var "API_USER_AGENT" "Eurecab/$EURECAB_EM_VERSION"
replace_env_var "BACKEND_HOST" "$EM_PROD_BACKEND_HOST"
replace_env_var "API_VERSION" "$EM_PROD_API_VERSION"
replace_env_var "ADYEN_ENV" "$EM_PROD_ADYEN_ENV"
replace_env_var "ADYEN_CLIENT_KEY" "$EM_PROD_ADYEN_CLIENT_KEY"
replace_env_var "ADYEN_ENCRYPTION_PUBLIC_KEY" "$EM_PROD_ADYEN_ENCRYPTION_PUBLIC_KEY"
replace_env_var "FIREBASE_PRODUCTION_PROJECT" "true"
replace_env_var "BACKEND_HOST_EDITABLE" "false"
replace_env_var "RECAPCTHA_DOMAIN" "$RECAPCTHA_DOMAIN_PROD"
replace_env_var "RECAPTCHA_KEY" "$RECAPTCHA_KEY_PROD"

I have tried this https://stackoverflow.com/questions/77643896/in-bitrise-node-js-failed-to-construct-transformer-error-error0308010cdigita solution but its not working.

Any help would be appreciated. Thank you

I need to build my react-native app in bitrise without an error , then only i can able to deploy that app in app store.

Leave a Comment