cmd view vue scaffolding version number
vue --version
If it is not an internal or external command
, search for the vue.cmd file on the computer, right-click the computer, properties-advanced system settings-environment variables, and add the path of vue.cmd to the environment variables
If you are viewing the version number of vue, you can see it directly in the package.json file, for example, vue: 2.6.1
Uninstall 4.0 version instruction
npm uninstall -g @vue/cli
Install the specified version 3.0 vuecli command
npm install -g @vue/cli@3.11.0
Start cmd, switch to the corresponding directory, enter vue init webpack in-ele-vue, press Enter, and it will appear:
? Project name ( my-project ) 敲y, 回车既可
?project description ( A Vue.js project ) 敲回车既可
?Author ( xxxxxx xxxxx@xx.com ) 敲回车既可
? Vue build ( user arrow Keys ) 敲回车既可
? Install vue-router?(Y/n)敲Y回车既可 (是否安装路由)
?Use ESLint to lint your code? (Y/n) 敲n回车既可(是否安装路由)
?Set up unit tests (Y/n) 敲n回车既可 ( 单元测试, 个人觉得不安装选择n )
?Setup e2e tests with Nighwatch?(Y/n) ( e2e测试,个人觉得不安装选择n )
?Should we run npm install for you after the project has been created? (recommended) (use arrow Keys) 这里是选择安装方式