cordova 添加插件时报错相关问题

Error: Failed to fetch platform android
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND pr

oxy-domain.com proxy-domain.com:8080

 

以上错误时在运行:cordova platform add android时报错的。

解决办法:将https-proxy=null,proxy=null两个变量设置为null即可解决。这两个变量在.npmrc文件里。可以用everything搜索npmrc文件,然后打开设置以上两个变量为null。或者在控制台直接输入命令npm config set proxy nullnpm config set https-proxy null。

猜你喜欢

转载自www.cnblogs.com/jinly/p/9636395.html