nodejs_install

May 19, 2026 ยท View on GitHub

Installs Node.js from packages, official binaries, source, or Chocolatey.

Actions

ActionDescription
:installInstalls Node.js. Default.
:removeRemoves artifacts created by the selected install method.

Properties

PropertyTypeDefaultDescription
versionString'24.15.0'Node.js version for source, binary, and Chocolatey installs.
install_methodStringplatform defaultOne of package, binary, source, or chocolatey.
install_repositorytrue, falsetrueConfigures NodeSource repositories for package installs.
packagesArray, nilplatform defaultPackage names to install for package installs.
package_actionSymbol, String:installAction passed to package resources.
package_optionsString, nilnilOptions passed to package resources.
disable_dnf_moduletrue, falsetrueDisables the distro Node.js DNF module on EL/Fedora 8+.
prefix_urlString'<https://nodejs.org/dist/'>Base URL for official Node.js source and binary artifacts.
source_urlString, nilnilOverride URL for source installs.
source_checksumString, nilofficial v24.15.0 checksumSource tarball checksum.
binary_urlString, nilnilOverride URL for binary installs.
binary_checksumsHashofficial v24.15.0 checksumsBinary checksums by architecture key.
append_env_pathtrue, falsetruePassed to ark for binary installs.
make_threadsInteger, String, nilCPU countParallel make jobs for source installs.
build_packagesArray, nilplatform defaultBuild dependency package list for source installs.
chocolatey_package_nameString'nodejs-lts'Chocolatey package name for Windows installs.

Examples

nodejs_install 'nodejs'
nodejs_install 'nodejs from source' do
  install_method 'source'
  make_threads 4
end
nodejs_install 'nodejs from binary' do
  install_method 'binary'
end