npm镜像源过期导致安装项目依赖时报错
安装Echarts时,在终端输入
sh
npm install echarts --savenpm install echarts --save提示
npm ERR! request to https://registry.npm.taobao.org/get-stream/download/get-stream-3.0.0.tgz failed, reason: certificate has expired
尝试
sh
npm config get registry
npm config set registry https://registry.npmmirror.com/npm config get registry
npm config set registry https://registry.npmmirror.com/然后再次尝试
sh
npm install echartsnpm install echarts仍然提示报错
sh
npm ERR! request to https://registry.npm.taobao.org/get-stream/download/get-stream-3.0.0.tgz failed, reason: certificate has expirednpm ERR! request to https://registry.npm.taobao.org/get-stream/download/get-stream-3.0.0.tgz failed, reason: certificate has expired- 尝试
sh
npm cache clean --force
npm config set registry https://registry.npmmirror.com
npm config listnpm cache clean --force
npm config set registry https://registry.npmmirror.com
npm config list然后
sh
npm install echartsnpm install echarts提示成功安装
liang14658fox