error An unexpected error occurred: “https://registry.npmjs.org/axios

error An unexpected error occurred: “https://registry.npmjs.org/axios

 yarn add 报错

大概意思是:(原因是代理的问题)

There appears to be trouble with your network connection. Retrying…(有道翻译:您的网络连接似乎有问题。重试…)

错误发生意外错误:https://registry.npmjs.org/axios

解决方法:

1.下载包的源地址设置成国内的

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

2. 或者下载包的源地址再切回国外

yarn config set registry https://registry.npmjs.org --global

3.科学上网试试(本人测试没有成功)

error An unexpected error occurred: “https://registry.npmjs.org/axios

成功

error An unexpected error occurred: “https://registry.npmjs.org/axios

error An unexpected error occurred: “https://registry.npmjs.org/axios

 总结:

 最后还是靠着国外的下载地址下载成功的,多尝试,可能就是网络的原因吧🤡

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/41e53a12f8.html