TFS build agent cannot locate npm

☆樱花仙子☆ 提交于 2019-12-08 15:29:12

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!