问题
On a locally hosted TFS I'm using the "npm install" build step in my build definition.
On the agent machine I have installed nodejs and can run npm from the command line.
When I attempt to queue the build I get a pop up with the message:
No agent could be found with the following capabilities: npm, DotNetFramework
So I attempted to add the capability, first by refreshing the agent capabilities and when that had no effect I added a capability:
npm C:\Program Files\nodejs
Then the build starts but the npm step throws the error:
Unable to locate npm
I suspect I have missed something on my agent set up because the agent is not reporting its npm capability?
回答1:
I had to restart the VSO agent service, allowing the new capability to be reported.
来源:https://stackoverflow.com/questions/34019067/tfs-build-agent-cannot-locate-npm