Command PhaseScriptExecution failed with a nonzero exit code
is a general message and because of this you may not find a solution that will work for your case. the best way to go about this is to get the root cause of this error.
Steps to get root cause