yarn install 的時(shí)候報(bào)了錯(cuò)誤
error An unexpected error occurred: "https://registry.npmmirror.com/moment: tunneling socket could not be established, cause=socket hang up".
解決方法
查看鏡像
npm config get registry //查看
yarn config get registry
// https://registry.npm.taobao.org/
切換淘寶鏡像
npm config set registry https://registry.npm.taobao.org
yarn config set registry https://registry.npm.taobao.org
我換了原來(lái)的鏡像
npm config set registry http://registry.npmjs.org
yarn config set registry https://registry.yarnpkg.com
yarn 不行就換npm,確保都換了,然后這個(gè)報(bào)錯(cuò)就可以解決了文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-758044.html
如果還不行的,檢查你的代理地址是否正確,是否防火墻影響文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-758044.html
到了這里,關(guān)于error An unexpected error occurred: “https://registry.npmmirror.com/moment: tunneling socket could n的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!