Skip to content

npm Functions

🛠️ Tools · ⬅ Top


npmInstall

Install NPM in the build environment

Usage

npmInstall version

Install NPM in the build environment If this fails it will output the installation log. When this tool succeeds the npm binary is available in the local operating system. Return Code: 1 - If installation of npm fails Return Code: 0 - If npm is already installed or installed without error

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Environment

  • BUILD_NPM_VERSION - String. Version of npm to install using native npm binary.
  • Read-only. Default version. If not specified, uses latest.
    • BUILD_NPM_VERSION - String. Default to latest. Used to install npm -i npm@$BUILD_NPM_VERSION on install.