I’m trying to run a React Vite project I cloned from GitHub but I did not have a Vite project prior to cloning. This is the error:
npm error Missing script: "start"
npm error
npm error Did you mean one of these?
npm error npm star # Mark your favorite packages
npm error npm stars # View packages marked as favorites
npm error
npm error To see a list of scripts, run:
npm error npm run
I expected it to run in my browser.
2
Answers
Since you cloned React Vite project from Github, your project doesn’t use a
start
script but has a different entry pointdev
, so use:For it to start and open on the browser.
Note: this will only work after you have run
npm install
ornpm i
after cloning.you can check all scripts in the package.json file.
},
These are by default available in Vite React project so, if you want to run the app the command is
npm run dev
and make sure you’re in root dir of your project.