Skip to content

Command PhaseScriptExecution failed with a nonzero exit code #53834

@femilcoderkube

Description

@femilcoderkube

In the latest React Native project (0.81.4), I have set hermes_enabled => false in the Podfile.
However, after running pod install, Hermes is not removed. Additionally, I am getting the following error:
Command PhaseScriptExecution failed with a nonzero exit code
In the Podfile, we made changes, but nothing reflects when running pod install

Please provide any solution.

Here is my pod file:

Resolve react_native_pods.rb with node to allow for hoisting

require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', dir]).strip

platform :ios, min_ios_version_supported
prepare_react_native_project!

target 'LastMinuteGambia' do
config = use_native_modules!
use_modular_headers!

use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => false,
:fabric_enabled => false,
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

Third-party pods

pod 'FBSDKLoginKit'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'RNSha256', :path => '../node_modules/react-native-sha256'
pod 'GoogleSignIn'

post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)

# Explicitly remove hermes-engine to prevent it from being included
installer.pods_project.targets.each do |target|
  if target.name == 'hermes-engine'
    target.remove_from_project
  end
end

end
end

Image

Originally posted by @femilcoderkube in #42111

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions