Vue Cli Service Not Recognized

Posted on  by admin

Modified7 months ago. Our production environment have to using "npm install --production" to install the project, but when trigger "npm run serve" that encounter Below error:.

  • 'vue-cli-service' is not recognized as an internal or external command,operable program or batch file.npm ERR!
  • code ELIFECYCLEnpm ERR!
  • Here is the command sequence :. npm install --production.

Below is the package.json. Could anyone help on this case ? John JinJohn Jin. Does the serve script require your devDependencies?

If you run npm install then npm run serve does it work? Can you run vue --version from your prod environment? That error makes me think the whole @vue/cli global install is missing. Post may be a dupe: How to solve 'vue-cli-service' is not recognized as an internal or external command? Just in case, you may want to rm -rf node_modules then install, then serve. Modified1 month ago. 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:. can someone guide me what to do to solve this issue ? 22 gold badges1111 silver badges2020 bronze badges. 2020 bronze badges. 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.

11 gold badge55 silver badges1414 bronze badges. 1414 bronze badges. This will install global npm package. @vue/cli-service is usully installed as global, because you do not usually copy these types of packages to every project. If the global npm package gets corrupted, it is not stored in node_modules folder, but rather in other depending on the os. Therefore removing node_modules does not help. Locations for global node_modules folders are.

%USERPROFILE%\AppData\Roaming\npm\node_modules (Win10) or. /usr/local/lib/node_modules (Linux),. check this stack overflow post on how to locate global packages. 11 gold badge1717 silver badges2020 bronze badges.