0

I am running jenkins to build a react app and executing shell commands to build the app automatically. I following are the bash commands

cd /var/www/FarmGroWeb sudo git reset --hard sudo git pull origin dev sudo yarn sudo yarn build 

It fails on the yarn step. The error output

sudo: yarn: command not found Build step 'Execute shell' marked build as failure Finished: FAILURE 

Tried adding #!/bin/sh as per this answer but this didn't work. What could be the workaround?

1 Answer 1

0

Yarn is not installed or not on the PATH for jenkins.

  • Install Yarn
  • Check it's on Jenkins' $PATH, or provide the full path in the script (e.g. /usr/bin/yarn).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.