Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Use this task to find, download, and cache a specified version of Node.js and add it to the PATH. This task also provides proxy support.
Syntax
# Use Node.js ecosystem v1
# Set up a Node.js environment and add it to the PATH, additionally providing proxy support.
- task: UseNode@1
inputs:
#version: '10.x' # string. Version. Default: 10.x.
#checkLatest: false # boolean. Check for Latest Version. Default: false.
Inputs
version
- Version
string
. Default value: 10.x
.
Required. Specifies the Node.js version using SemVer's version range syntax. Examples: 10.x
, 10.15.1
, >=10.15.0
.
checkLatest
- Check for Latest Version
boolean
. Default value: false
.
Checks online for the latest available version that satisfies the version spec. This should be false
unless you need to always have the latest version. Setting the value to true
will cause the task to incur download costs that may be unnecessary, especially with the hosted build pool.
Task control options
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
Output variables
None.
Requirements
Requirement | Description |
---|---|
Pipeline types | YAML, Classic build, Classic release |
Runs on | Agent, DeploymentGroup |
Demands | None |
Capabilities | Running this task satisfies the following demands for any subsequent tasks in the same job: Node |
Command restrictions | Any |
Settable variables | Any |
Agent version | 2.144.0 or greater |
Task category | Tool |