installNodeJS
Installs node and global packages. This operation can be placed right before other node executions in build, deploy, test, or utility workflows. If node is already installed in specified folder, this operation will not perform any changes. Note that this operation will install specific version-based folder for each version of node and manage global packages in that upon execution.
Inputs
Input Name | Input Code | Required | Description |
---|---|---|---|
Node Install Name |
| Yes | Folder with Install Name is used in installation path. This should be helpful when separate global package configurations is required for various projects. This input defaults to shared. For example, <Endpoint Working Directory>/installs/nodejs/{FDNODE_INP_INSTALL_NAME}/{FDNODE_INP_NODE_VERSION} e.g. /var/flexdeploy/production/installs/nodejs/shared/v10 is where node will be installed for shared as name and v10. If you need specific combination of node and global packages, you can install that in separate folder and use necessary node based execution using that installation. |
Install Node Version |
| Yes | Version of node to be installed. Each version is installed in separate folder under Node Install Name folder. This input defaults to v14. |
Global NPM Packages |
| No | Space separated list of NPM packages that will be installed globally. You can specify versions by appending the version after the package with @ sign. (For example, grunt@1.3.0 grunt-cli@1.3.2) It is recommended to use versions like grunt@1.3.0 instead of just grunt to get predictable behavior for builds. |
.npmrc |
| No | npm configurations entered as list of key = value parameters (e.g. loglevel=notice), one key value pair per line. @Since 6.5.0.15 All default npmrc configurations are listed when the command “npm config list -l” is run. Some examples are- 1.registry=https://registry.npmjs.org/ (Specifies the URL of the npm registry) 2.strict-ssl=false (Controls SSL certificate validation during HTTPS requests.) 3.proxy=http://your-proxy-url:port 4.loglevel=verbose (Sets the logging level for npm output (e.g., 5.production=true (Instructs npm to skip installation of devDependencies.) For more details, refer npm-config | npm Docs Also, when multiple .npmrc files are available, npm follows a specific hierarchy for merging these configurations. Such as Project-Specific > User-Specific >Global. For more details, refer https://docs.npmjs.com/cli/v10/configuring-npm/npmrc |
Outputs
Output Name | Description |
---|---|
| An absolute path where Node and Global Packages were installed. |
Artifacts
This operation does not produce or consume artifacts.
Endpoint Selection
This operation delegates endpoint selection to workflow developer.
Endpoint Execution
This operation delegates endpoint execution to workflow developer.
- style