Install the latest version of vue-cli:
Still the old version wants to uninstall and install the latest version
Uninstall the 2.x version of vue-cli:
npm uninstall -g vue-cli 或 yarn global remove vue-cli
Install the latest version of @vue/cli:
npm install -g vue-cli — This command has been deprecated after 3.0
npm install -g @vue/cli 或 yarn global add @vue/cli
Enter vue -V again to verify:
About the init command cannot be used
The init command cannot be used due to the installation of vue cli 3.x version:
Can be used to install the init command module
npm install -g @vue/cli-init