3

I have used the below to build the code using yarn , which was perfectly working in Azure DevOps pipeline until yesterday

enter image description here

I am not sure what has changed, now its throwing the below error:

enter image description here

I have searched the error for exit code 127 but the solution is removing node_modules folder and rerunning. But this cannot be achieved in build agent. Any solutions that can be applied in this situation?

Update:

I used system.debug=true and below is the output: enter image description here

Asterix
  • 331
  • 6
  • 22
  • Did you try the command under your local agent, is that right? And if that failed, what is the specific error? Also, you could use `system.debug= true` under pipeline to check the error. – Mr Qian Jun 07 '21 at 10:23
  • the command failed in the self hosted agent , but it was working a day before. When that failed, it showed "yarn :command not found". In my local system when I tried it was working fine. In Azure pipelines it is failing ( which was working earlier) – Asterix Jun 07 '21 at 16:15
  • I have updated the query with the screenshot after using system.debug=true – Asterix Jun 07 '21 at 16:20
  • same problem here :( – Mehmet Oct 12 '21 at 13:57

2 Answers2

3

I found what was changed here overnight, InfraAdmin has changed microsoft hosted agent to self hosted agent , which didnt have yarn dependencies installed.

Asterix
  • 331
  • 6
  • 22
1

Try adding corepack enable to the top of your command line script. That worked for me when I was getting the same error message.