UseNode@1 - Use Node.js ecosystem v1 task
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.
#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.
# 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.
# 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.
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.
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.
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.
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, npm, node.js |
Command restrictions | Any |
Settable variables | Any |
Agent version | 2.144.0 or greater |
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 | 2.144.0 or greater |
Task category | Tool |
Tagasiside
https://aka.ms/ContentUserFeedback.
Varsti tulekul: 2024. aasta jooksul tühistame GitHubi probleemide funktsiooni sisutagasiside mehhanismina ja asendame selle uue tagasisidesüsteemiga. Lisateabe saamiseks vtEsita ja vaata tagasisidet