"npm run watch" not working and returning error's saying 'missing "Watch"'

The error you're encountering with npm run watch suggests that there might be an issue with the configuration of your project or the scripts defined in your package.json file. Here are a few steps you can take to troubleshoot and resolve the issue:

1. Update your package.json file.

...
    "scripts": {
    "dev": "vite",
    "build": "vite build",
    "watch": "vite build --watch"
},
...

2. Now try running


npm run dev
npm run watch

Comments

Leave a Reply