This error message indicates that the system does not recognize the 'vue-cli-service' command, which means that the corresponding executable file is not found in the system.
This is usually caused by the command's environment variables not being configured correctly.
Solution:
- Make sure you have installed vue-cli globally:
npm install -g @vue/cli
- Try running vue-cli-service with an absolute path, eg:
/usr/local/bin/vue-cli-service
- Try reopening the command line window or restarting the computer.
- Make sure that the environment variables are configured correctly, you can try to enter in the command line window
echo $PATH
to check whether the environment variables are configured correctly.