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
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.
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
This task can install node.js in the agents of the Default agent pool.