The nodenv plugin installs node and yarn. This allows you to deploy an app with confidence that yarn and a particular version of node will be available on the host. This plugin is strongly recommended for Rails apps, which by default use webpacker and thus require node and yarn.
|Location of the deploy user’s
|Whether to install yarn globally via
npm i -g yarn
|Version of node to install; if nil (the default), determine the version based on .node-version
|A value of
nil (the default) means install the latest; specify this only if you need a specific 1.y.z global version of yarn
Installs nodenv, uses nodenv to install node, and makes the desired version of node the global default version for the deploy user. During installation, the user’s bashrc file is modified so that nodenv is automatically loaded for interactive and non-interactive shells.
You must supply a value for the
nodenv_node_version setting or have a
.node-version file in your project for this task to work.
By default, yarn is also installed globally via npm. This can be disabled by setting
nodenv:install is intended for use as a setup task.