今天在安装vue项目的依赖时,使用npm命令报错了,应该说是原来设置的源镜像网站的证书过期了。
npm ERR! request to https://registry.npm.taobao.org/create-vue failed, reason: certificate has expired
解决方案:
将网址修改为https://registry.npmmirror.com/
运行如下命令后再执行“npm init vue@latest” 就成功了
npm config set registry https://registry.npmmirror.com/