Setup Node.js with NVM

Node.js is a pre-requisite to run both the Hexabot CLI and a Hexabot project since the API is built on NestJS. Using NVM (Node Version Manager) simplifies managing the required Node.js version. When creating a new Hexabot project, the structure includes source folders like extensions to add custom plugins, helpers and channels, making Node.js essential tool for smooth development and customization.

If you are new to NVM, please follow these steps to install:

  1. Update the system:

sudo apt update
  1. Install NVM:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
  1. Verify the NVM installation:

nvm --version
  1. Install Node.js version 18.17.0 or higher :

nvm install 18.17.0
  1. Check default Node.js version:

node --version

Last updated