Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn commands in Azure pipelines

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

like image 818
Asterix Avatar asked Oct 16 '25 11:10

Asterix


2 Answers

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

like image 162
Asterix Avatar answered Oct 19 '25 09:10

Asterix


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

like image 38
user1397265 Avatar answered Oct 19 '25 09:10

user1397265



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!