Choose your preferred SSG:
Choose your preferred SSG:

Managing your Node.js version with nvm

CloudCannon uses the LTS (v16.13.0) version of Node.js by default. You can use nvm to select which node version to use with your build.

The following Node.js versions are pre-installed:

  • v10.24.1
  • v12.22.9
  • v14.18.3
  • v15.14.0
  • v16.13.0 (default)
  • v16.13.1​​​​​​ (LTS)

Each Node.js version has the following packages preinstalled globally:

Usage

Select which nvm version to use in your preinstall script:

.cloudcannon/preinstall
nvm use v14.18.3

Or install and use a custom version:

.cloudcannon/preinstall
nvm install v17.5.0
nvm use v17.5.0

.nvmrc

Add a .nvmrc to your site’s root directory to specify which node version to use. For example:

.nvmrc
v12.22.9

Then in your preinstall script:

.cloudcannon/preinstall.sh
nvm use
Was this article helpful? or Suggest an improvement >

Other Resources

  1. Node.js Home
  2. nvm Documentation
  3. Yarn Home