Skip to content

nvm

The NVM resource reference. This resource will allow Codify to install NVM (node version manager). NVM allows multiple different versions of NodeJS to live within the same system. It can also set a global version to be active.

Parameters:

  • global: (string) The global version of node to use.

  • nodeVersions: (array[string]) Node versions to be installed.

Example usage:

codify.json
[
{
"type": "nvm",
"global": "18.20",
"nodeVersions": [
"18.20", "20.9.0", "16"
]
}
]

Setting up NodeJS

  1. Create a codify.json file anywhere.
  2. Open codify.json with your file editor and paste in the follow configs.
codify.json
[
{
"type": "nvm",
"global": "20.9",
"nodeVersions": [
"20.9"
]
}
]
  1. Run codify apply in the directory of the file. Open a new terminal and run the command node -v and v20.9 should be returned. NodeJS is now installed and ready for use.
codify.json
codify apply