杭州智能模板建站,河南做网站公司排名,wordpress 跳转链接,网站建设_微信开发npm淘宝镜像过期解决办法
因为npm 官方镜像#xff08;registry.npmjs.org#xff09;在国内访问很慢#xff0c;我们基本上都会选择切换到国内的一些 npm 镜像#xff08;淘宝镜像、腾讯云镜像等#xff09;。由于淘宝原来的镜像#xff08;registry.npm.taobao.orgregistry.npmjs.org在国内访问很慢我们基本上都会选择切换到国内的一些 npm 镜像淘宝镜像、腾讯云镜像等。由于淘宝原来的镜像registry.npm.taobao.orgHTTPS 证书正式到期因此需要切换到淘宝最新的镜像否则会出现证书到期异常。
解决办法
1.检测现在的镜像地址
npm config get registry2.如果不是淘宝最新的镜像地址请更换
//清空缓存
npm cache clean --force
//切换新源
npm config set registry https://registry.npmmirror.com3.最好使用淘宝命令工具cnpm
//安装cnpm
npm install -g cnpm --registryhttps://registry.npmmirror.com
//检测是否安装成功
cnpm -v
//安装你的依赖,这是我的
cnpm install vue-bus之后安装就可以成功了
国内镜像还有如下根据自己的需要使用 腾讯:http://mirrors.cloud.tencent.com/npm/ 华为https://mirrors.huaweicloud.com/repository/npm/ 中科大镜像:https://registry.npmjs.org/