error An unexpected error occurred: https://registry.npmmirror.com

一、背景

使用yarn在vscode终端执行yarn

二、遇到的问题

报错:

error An unexpected error occurred: "https://registry.npmmirror.com/@icon-park/vue-next/-/vue-next-1.4.2.tgzinfo If you think this is a bug, please open a bug report with the information provided in "E:\\college\\bloinfo Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
yarn run v1.22.19

在这里插入图片描述

三、解决办法

方法1:
如使用yarn命令:
查看:

yarn config get registry 

设置淘宝镜像:

yarn config set registry https://registry.npm.taobao.org

效果图:
error An unexpected error occurred: https://registry.npmmirror.com_第1张图片
如使用mpm命令:
查看

npm config get registry

切换淘宝镜像

npm config set registry https://registry.npm.taobao.org

附件:

在这里插入图片描述
参考1: yarn : 无法将“yarn”项识别为 cmdlet、函数、脚本文件或可运行程序的名称 (推荐)
参考2:error An unexpected error occurred: “https://registry.npmmirror.com/moment: tunneling socket could

你可能感兴趣的:(Node.js,vue.js,javascript,前端)