使用node lts版本,当前版本为14.17.6,否则安装组件时会提示错误,需要安装Visual Studio
npm config set prefix "D:\apps\node-v14.17.6\global"
npm config set cache "D:\apps\node-v14.17.6\cache"
npm config set registry https://registry.npm.taobao.org
使用vue2
npm install -g webpack
npm install -g @vue/cli
npm install -g @vue/cli-init
vue init webpack nxz-vue
cd nxz-vue
npm run dev
使用vue3
npm install -g @vue/cli
vue create nxz-vue
cd nxz-vue
npm run serve
npm install vue-router
vue add router
npm install element-plus --save
npm install terser-webpack-plugin@^4.2.3 --save
https://www.npmjs.com/package/terser-webpack-plugin/v/4.2.3
npm install sass-loader@^10.1.1
npm install node-sass@^v5.0.0