mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
GITBOOK-95: abdousfayhi12's Nov 20 changes
This commit is contained in:
committed by
gitbook-bot
parent
597bf960bc
commit
a5ad765d15
43
docs/developer-guide/setup-node.js-with-nvm.md
Normal file
43
docs/developer-guide/setup-node.js-with-nvm.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# 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](https://github.com/nvm-sh/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:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
2. Install NVM:
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
3. Verify the NVM installation:
|
||||
|
||||
```bash
|
||||
nvm --version
|
||||
```
|
||||
|
||||
4. Install Node.js version 18.17.0 or higher :
|
||||
|
||||
```bash
|
||||
nvm install 18.17.0
|
||||
```
|
||||
|
||||
5. Check default Node.js version:
|
||||
|
||||
```bash
|
||||
node --version
|
||||
```
|
||||
Reference in New Issue
Block a user