title | description | ms.date | monikerRange |
---|---|---|---|
UseNode@1 - Use Node.js ecosystem v1 task |
Set up a Node.js environment and add it to the PATH, additionally providing proxy support. |
07/02/2024 |
>=azure-pipelines-2019.1 |
:::moniker range=">=azure-pipelines-2019.1"
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.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.2"
# 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.
#force32bit: false # boolean. Use 32 bit version on x64 agents. Default: false.
# advanced
#retryCountOnDownloadFails: '5' # string. Set retry count when nodes downloads failed. Default: 5.
#delayBetweenRetries: '1000' # string. Set delay between retries. Default: 1000.
:::moniker-end
:::moniker range=">=azure-pipelines-2020.1 <=azure-pipelines-2022.1"
# 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.
#force32bit: false # boolean. Use 32 bit version on x64 agents. Default: false.
:::moniker-end
:::moniker range=">=azure-pipelines-2019.1 <=azure-pipelines-2020"
# 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.
:::moniker-end
:::moniker range=">=azure-pipelines-2019.1"
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
.
:::moniker-end
:::moniker range=">=azure-pipelines-2019.1"
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.
:::moniker-end
:::moniker range=">=azure-pipelines-2020.1"
force32bit
- Use 32 bit version on x64 agents
boolean
. Default value: false
.
Installs the x86 version of Node.js on a 64-bit Windows agent. Only works on Windows agents.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.2"
retryCountOnDownloadFails
- Set retry count when nodes downloads failed
string
. Default value: 5
.
Use this option when the task failed to download node binaries from the mirror. The task will retry to download the binaries for the specified times.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.2"
delayBetweenRetries
- Set delay between retries
string
. Default value: 1000
.
Use this option to set the delay between retries in milliseconds. The default value is 1000 milliseconds.
:::moniker-end
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
:::moniker range=">=azure-pipelines-2019.1"
None.
:::moniker-end
:::moniker range=">=azure-pipelines-2020"
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, node.js |
Command restrictions | Any |
Settable variables | Any |
Agent version | 2.144.0 or greater |
Task category | Tool |
:::moniker-end
:::moniker range="=azure-pipelines-2019.1"
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 |
:::moniker-end