Search code examples
azure-devopsazure-pipelinesazure-pipelines-yaml

##[error]No agent found in pool Default which satisfies the following demand: node.js


I am getting following error when I try to run my pipeline on self hosted agent (2.175.2)

##[error]No agent found in pool Default which satisfies the following demand: node.js. All demands: vstest, node.js, Agent.Version -gtVersion 2.163.1

The tasks in my pipeline are

  - task: DownloadBuildArtifacts@0
  - task: PowerShell@2
  - task: CopyFiles@2
  - task: PublishBuildArtifacts@1
  - task: AppCenterDistribute@3
  - task: VSTest@2
  - task: store-publish@0

Solution

  • No agent found in pool Default which satisfies the following demand: node.js.

    From the error message, node.js is a necessary demand to run your pipeline. But it seems that the agents in the Default Agent Pool doesn't have this Capability.

    You can navigate to Organization Settings -> Agent Pools -> Default -> Target Agent -> Capabilities to check the information.

    enter image description here

    Here are two methods to solve this issue:

    • You could manually install node.js on the machine where the agent is installed. Then restart the build agent. Restarting the build agent will capture the added Capabilities.

    • In Azure Devops Pipeline, you could add the task: Node.js tool installer

    enter image description here

    This task can install node.js in the agents of the Default agent pool.