Able to run my appium tests using the terminal however not able to run using Jenkins

[0-1] 2020-04-01T17:34:21.535Z WARN webdriver: Request failed due to An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS\,tvOS' exited with code 1

I have run reinstalled every single thing including the carthage from the jenkins directory as well from the desktop but still keep getting the same error.

I did every single thing I could have possibly think of. But still the same error. Can someone help please?

My tests are located on my desktop and I can easily start my two appium servers one at 4723 and 4724 and then start my tests from the desktop terminal

However when I run this Jenkins pipeline I get the error above, here is my Jenkins pipeline

pipeline {
agent any

environment {
    APPIUM_PORT_ONE= 4723
    APPIUM_PORT_TWO= 4724
}

tools {nodejs “node”}

stages {
stage(‘Checkout App 1’) {
steps {
echo “Building…”
sh " whoami"
}
}

    stage('Checkout App 2') {
        steps {
            echo "Building.."
        }
    }
    
    stage('Checkout Mirror') {
        steps {
            echo "Building.."
        }
    }
    
    stage('Checkout End to End Tests') {
        steps {
            echo "Building.."
        }
    }

    stage('Starting Appium Servers') {
        steps {
            parallel(
                ServerOne: {
                sh "kill \$(lsof -t -i :${APPIUM_PORT_ONE}) &"
                sh "kill \$(lsof -t -i :${APPIUM_PORT_TWO}) &"
                echo "Starting Appium Server 1"
                sh 'npm install -g appium'
                
              },
                ServerTwo: {
                echo "Starting Appium Server 2"
                
              })
              }
          }

      stage('Starting End to End Tests') {
        steps {
            echo "Starting End to End Tests"
            dir("/Users/chirag.verma/Desktop/qa-end-to-end/") { // <<------------
            sh "appium --port 4724 --address 127.0.0.1 &"
            sh "appium --port 4723 --address 127.0.0.1 &"
            sh 'npm run test.test'
            sh 'npm install selenium-standalone@latest -g'
            echo "Shutting Down Appium Servers"
            sh "kill \$(lsof -t -i :${APPIUM_PORT_ONE}) &"
            sh "kill \$(lsof -t -i :${APPIUM_PORT_TWO}) &"
        }
      }
    }

    stage('Publish Report') {
        steps {
            echo "Publishing Report"
        }
    }
}
}