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

前端 未结 8 1351
北海茫月
北海茫月 2021-01-03 18:07

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 r

8条回答
  •  长情又很酷
    2021-01-03 18:42

    In my case, the package @vue/cli-service is installed in my local node_modules environment, but not my global environment, so it cannot be used as a command. I type .\node_modules\.bin\vue-cli-service serve and it works.

提交回复
热议问题