1.vue安装
npm install -g @vue/cli
2.切换淘宝镜像cnpm
npm install nrm -g --save #安装nrm
nrm ls #查看默认配置
3.此时会出现bug
报错throw new TypeError(‘Path must be a string. Received ‘ + inspect(path))?解决办法:
打开nrm的文件夹下cli.js 第17行修改成
const NRMRC = path.join(process.env[(process.platform == ‘win32’) ? ‘USERPROFILE’ : ‘HOME’], ‘.nrmrc’);
4.使用淘宝镜像
nrm use cnpm