nodejsnpmpackages

May 19, 2026 ยท View on GitHub

Installs or removes a collection of npm packages.

Actions

ActionDescription
:installConverges each package entry with its requested action. Default.
:removeRemoves each listed package.

Properties

PropertyTypeDefaultDescription
packagesArray[]Array of package hashes. Use name for package name and any npm_package property for options.

Examples

nodejs_npm_packages 'application packages' do
  packages [
    { name: 'express' },
    { name: 'socket.io', version: '4.8.1' },
    { name: 'express', action: :remove },
  ]
end