[Vuejs]-Cannot run npm run serve

0👍

You may check your current cli installation and maybe reinstall your vue-cli. Basically, an npx command runs within your project directory. So running npx [whatever] will always use modules installed within your project itself while npm run [whatever] may refer to some globally installed dependencies.

That said, you might also try using yarn. In the past I’ve also had some trouble running vue-cli through npm so I switched to yarn.

However I can not help you regarding your index.html problem since this may be another issue. But if you’ve bootstrapped a fresh vue project throughout vue-cli, it should work.

👤Aer0

0👍

You can try this:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

It’s work for me.

Leave a comment