Check your version of Node.
node -v
npm -v
Install create-vite globally.
npm install -g create-vite
Create a new vite project. Once prompted, select the name of the project, select 'React' as the library and "JavaScript" as the language.
npm create vite@latest
Navigate inside the project folder and install Node dependencies.
cd vite-project-folder
npm i
Run the project in the browser.
npm run dev