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:
[ { "type": "nvm", "global": "18.20", "nodeVersions": [ "18.20", "20.9.0", "16" ] }]Setting up NodeJS
- Create a
codify.jsonfile anywhere. - Open
codify.jsonwith your file editor and paste in the follow configs.
[ { "type": "nvm", "global": "20.9", "nodeVersions": [ "20.9" ] }]- Run
codify applyin the directory of the file. Open a new terminal and run the commandnode -vandv20.9should be returned. NodeJS is now installed and ready for use.
codify apply