How to solve 'vue-cli-service' is not recognized as an internal or external command?

Dcoder14 picture Dcoder14 · Oct 27, 2019 · Viewed 48.1k times · Source

I am getting an error when trying to run npm run serve. At first I installed node.js then vue as well as vue/cli. But when I am trying to run server as -> npm run serve at that time I'm getting error like 'vue-cli-service' is not recognized as an internal or external command.

I used below codes for installation:

npm install -g vue
npm install -g @vue/cli

enter image description here

can someone guide me what to do to solve this issue ?

Answer

s4k1b picture s4k1b · Oct 27, 2019

I think you are using cmd in windows.

Try deleting the node_modules folder and after that run npm i from the cmd.

Then try running npm run serve again and see if it works this time