环境配置
1.安装git工具
https://github.com/git-for-windows/git/releases/download/v2.27.0.windows.1/Git-2.27.0-64-bit.exe
2.安装node
https://npm.taobao.org/mirrors/node/v14.5.0/node-v14.5.0-x64.msi
在git工具中输入node -v检验是否成功
3.安装cnpm
git工具中输入:npm install -g cnpm --registry=https://registry.npm.taobao.org
检验是否安装成功:cnpm
4.安装yarn
git工具输入:npm install -g yarn
检验是否安装成功:yarn -v
5.vue安装:
git工具输入:cnpm install vue
6.vue-cli3脚手架工具安装:
git工具输入:cnpm install -g @vue/cli或者yarn global add @vue/cli
检查其版本是否正确:vue –version
7.创建vue项目:vue ui
8.control+c终止vue ui
9.在vscode中运行项目:yarn serve
npm install vue-router --save-dev
yarn install
yarn serve
依然可以运行项目