The error message “‘vue-cli-service’ is not recognized as an internal or external command” typically occurs when you’re trying to run Vue CLI commands, but your system does not recognize the Vue CLI as a valid command. This issue can happen if Vue CLI is not installed globally or if there is a problem with your system’s PATH configuration.
Here are steps to solve this issue:
1. Check Vue CLI Installation: Ensure that Vue CLI is installed globally on your system. You can install it globally using npm (Node Package Manager) by running the following command in your terminal or command prompt:
npm install -g @vue/cli
If it’s already installed, you can check the version with:
2. Check PATH Configuration: Ensure that the directory where global npm packages are installed is in your system’s PATH. This is important because it allows your system to find and execute globally installed packages.
On Windows: The path should include something like
On macOS and Linux: The path should include something like
/usr/local/bin or ~/.npm-global/bin
If it’s not there then you have to add a path manually. Once you add it restart your computer then run your vue cli command again.