-
Run the NVM installer:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
-
Update your profile configuration:
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
-
Reload the shell configuration:
source ~/.bashrc
-
Verify the NVM installation:
nvm -v
nvm install 18
nvm use 18
npm install
npm run dev
# or
yarn dev
# or
pnpm dev
npm run build
npm start