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.
There is a newer version of the task available. For more information, see UseNode@1.
Syntax
# Use Node.js ecosystem v0
# Finds or downloads and caches the specified version spec of Node.js and adds it to the PATH.
- task: NodeTool@0
inputs:
versionSpec: '6.x' # string. Required. Version Spec. Default: 6.x.
#checkLatest: false # boolean. Check for Latest Version. Default: false.
# Use Node.js ecosystem v0
# Finds or Downloads and caches specified version spec of Node and adds it to the PATH.
- task: NodeTool@0
inputs:
versionSpec: '6.x' # string. Required. Version Spec. Default: 6.x.
#checkLatest: false # boolean. Check for Latest Version. Default: false.
Inputs
versionSpec
- Version Spec
string
. Required. Default value: 6.x
.
Specifies the version spec of the version to get. Examples: 6.x
, 4.x
, 6.10.0
, >=6.10.0
.
checkLatest
- Check for Latest Version
boolean
. Default value: false
.
Specifies the agent to check for the latest available version that satisfies the version spec. For example, you select this option because you run this build on your self-hosted agent, and you want to always use the latest 6.x
version.
Tip
If you're using the Microsoft-hosted agents, you should leave this set to false
. Microsoft updates the Microsoft-hosted agents on a regular basis, but they're often slightly behind the latest version. Enabling this parameter could result in your build spending a lot of time updating to a newer minor version.
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.
Remarks
There is a newer version of the task available. For more information, see UseNode@1.
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, npm |
Command restrictions | Any |
Settable variables | Any |
Agent version | All supported agent versions. |
Task category | Tool |
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 | All supported agent versions. |
Task category | Tool |
See also
For an explanation of tool installers and examples, see Tool installers.