DEV Community

subash
subash

Posted on

this is for to change old version node and curl install

The problem is curl is not installed, so the NVM installation never happened.
That is why:
nvm: command not found
appears.

Fix Step-by-Step
Step 1 — Install curl
Run:
sudo apt update
Then:
sudo apt install curl
Type your password if asked.

Step 2 — Install NVM Again
Now run:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Step 3 — Reload Bash
Run:
source ~/.bashrc

Step 4 — Check NVM
Run:
nvm --version
If installed correctly, it shows something like:
0.39.7

Step 5 — Install Latest Node.js
Run:
nvm install node

Step 6 — Verify
node -v
You should see:
v20.x.x
or newer.

Step 7 — Create Vite App
Now finally:
npm create vite@latest
This should work correctly now.

Top comments (0)