在Visual Studio Team Services中设置节点JS(VS在线)

时间:2016-06-29 10:54:18

标签: node.js tfs tdd azure-devops

我在VS(Pure HTML)中有应用程序。 在预构建脚本中,

cd $(ProjectDir)
@powershell Set-ExecutionPolicy -ExecutionPolicy unrestricted; 
@powershell  iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
@powershell Set-ExecutionPolicy -ExecutionPolicy unrestricted;
@powershell  choco install nodejs
call npm install
call grunt TaskScripts

执行节点安装时失败。

帮我解决这个问题。

感谢。

1 个答案:

答案 0 :(得分:0)

如果您使用的是vNext版本,则可以在构建定义中添加NPM任务以安装节点:

https://msdn.microsoft.com/en-us/Library/vs/alm/Build/steps/package/npm-install