npm ERR! code ECONNREFUSED
在使用npm安装微信小程序的wx-server-sdk报错:
$ npm install
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to http://registry.npmjs.org/wx-server-sdk failed, reason: connect ECONNREFUSED 127.0.0.1:1087
因为用过ss代理,在尝试了一系列网上的方法均无法安装,例如:
npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/
对我无效。
于是尝试了下面的方法,最终安装成功:
npm config set proxy http://127.0.0.1:1087
npm config set