error An unexpected error occurred: “https://registry.npm.taobao.org

背景: 想使用yarn命令结果报错
问题原因: 原来证书到期了
http://registry.npm.taobao.org/ 把这个放到浏览器搜索的时候自动换成https://registry.npmmirror.com/

方案:

  1. npm cache clean --force
  2. npm config set registry https://registry.npmmirror.com

最后查看npm当前镜像源 npm config get registry

npmmirror的话就没问题了

相关推荐
我不是李.杨6 小时前
解决 npm i node-sass@4.12.0 安装失败异常 npm i node-sass异常解决
rust·npm·sass
艾小码10 小时前
三大 Node.js 包管理器对决:npm、yarn、pnpm 深度横评
npm·yarn
金金金__1 天前
无废话,直接干,一篇短篇教你利用Corepack安装Yarn~
npm·yarn
liliangcsdn2 天前
`npm error code CERT_HAS_EXPIRED‘ 问题
前端·npm·node.js
Rattenking2 天前
【npm 解决】---- TypeError: crypto.hash is not a function
前端·npm·哈希算法
这是个栗子2 天前
npm报错:npm install 出现“npm WARN old lockfile”
前端·npm·node.js·编辑器
努力奋斗14 天前
npm ERR! code CERT_HAS_EXPIRED:解决证书过期问题
前端·npm·node.js
西岭千秋雪_5 天前
前端工程化:npm&vite
前端·javascript·npm·node.js
太阳伞下的阿呆5 天前
npm安装下载慢问题
前端·npm·node.js
这是个栗子5 天前
express-jwt报错:Error: algorithms should be set
前端·npm·node.js