error An unexpected error occurred: “https://registry.nlark.com/date-fns/download/date-fns-2.23.0.tg

error An unexpected error occurred: “https://registry.nlark.com/date-fns/download/date-fns-2.23.0.tg_第1张图片
解决方案:
运行命令,把资源地址设置成npm淘宝源

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

结果还是不行,
继续百度一通。

运行删除代理命令:

npm config rm proxy 
npm config rm https-proxy

重新yarn,ok了。

你可能感兴趣的:(npm)