npm run dev

1 min read
npm run dev
is used to start your development server when using tools like Vite, Next.js, or other modern JavaScript setups.
⚙️ What happens when you run npm run dev:
1. It looks in your package.json under the "scripts" section.
2. It finds a script like this:
"scripts": {
"dev": "vite"
}
3. So it runs vite, which starts the Vite dev server.
4. You get a local development site — usually at http://localhost:5173.
✅ You’ll see output like:
VITE v5.x.x ready in 300 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
Open that URL in your browser and you’ll see your app running!
If npm run dev doesn’t work, make sure you’ve done:
npm install
0
Subscribe to my newsletter
Read articles from Godson Prakasia directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
