Practice this fail.
npm would like a word with your flag.
npm / Vite · Restart as often as you like
Read the error, choose a command, and learn
why it works. Nothing runs on your machine.
This trusted local project defines "dev": "vite". Its usual development port is occupied, and you want port 4100.
npm would like a word with your flag.
$ npm run dev
> vite
The usual port is already occupied.
How do you pass the port choice through npm to Vite?
Fixed. By hand.
npm run dev -- --port 4100The -- after the npm script name passes subsequent arguments to that script. Vite’s --port option chooses its listening port, so npm run dev -- --port 4100 supplies the option to Vite rather than consuming it as an npm option.
Practice does not affect your daily score or streak.