6

In Visual Studio Online you can now set build dependencies on the General tab of a build definition.

enter image description here

But.. is there a way to set the version of Node.js and NPM?

It seems like a hosted build agent is currently using Node.js v0.12.7 and NPM v2.11.3 but I need Node.js v4.2+ and NPM v3.3+. Is there a way to enforce it?

P.S.: On-premise VSO build agent is not an option.

1
  • i have the same problem, i think the only solution is to build using your own custom build server with vsts build agent installed on it Sep 5, 2016 at 10:59

2 Answers 2

8

There is now a Node Tool installer available. The link to software inventory shared by Daniel was very helpful, and I discovered the installer digging into the Node specs for Hosted VS2017 agent.

Finds or downloads and caches the specified version of Node.js and adds it to the PATH

Try adding a Node Tool installer step before your node/npm steps.

4

It seems like there's a lot of misunderstanding as to what "demands" are. A build with a specific demand does not change what software is available on the build agent. A "demand" is simply a method of a build task expressing what requirements it has, so it can run on an agent that has the desired demands satisfied (these are the build agent's "capabilities").

This list of software is what's on the hosted build agent. If it's not there, and you can't install it via npm or the like, then you're out of luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.