Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure private build agent : No agent could be found with the following capabilities: npm, azureps

I am trying to use a local server as a build agent to build a project. The server already has

  • VS 2015,
  • VS 2017
  • Node 6,7,8 via NVM
  • NPM 4,5,6 via NVM

I can build the project locally via npm build or yarn build.

I have downloaded and configured and registered the private build agent already and I have it in the agent pool in the portal - xxx.visualstudio.com/xxx.

But when I try to schedule a build from the portal the following message is displayed :

No agent could be found with the following capabilities: npm, azureps

What do I need to fix so the build can run locally?

like image 453
Ognyan Dimitrov Avatar asked Jul 07 '17 09:07

Ognyan Dimitrov


1 Answers

The problem was simple - I did not see where the Capabilities tab was. IMHO Requests and Capabilities are not easily discoverable. I saw it and I set the two variables to true and it started to work even though I did not know for sure if true is the right value.

Another problem was that NVM SYMLINK was not working as expected and the build agent could not find node.exe at all. It was not in the PATH at all. I uninstalled nvm and used only node 8.1.2 with npm 5 in order to make it run.

enter image description here

UPDATE As of today you can add a 'node tool installer' task to your definition - this is the better solution that is available today as D.J. points out in the comment section.

like image 114
Ognyan Dimitrov Avatar answered Sep 18 '22 13:09

Ognyan Dimitrov