npm publish Publishing failed can not connect https://registry.npmjs.org

Write your own npm package, before each regular updates are released, a recent update to be, want to release, then npm publish should have failed,

The following error message:

npm ERR! network request to https://registry.npmjs.org/yy-org-switch failed, reason: connect ETIMEDOUT 104.16.16.35:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

Screenshot below: 

 

Meaning is not connected https://registry.npmjs.org, visit this URL in your browser really can not access, online search of various materials, mainly Taobao source or remove npm npm config set proxy = null but do not work ,

I wondered is not a computer problem, so https://registry.npmjs.org access using a mobile phone can actually access,

Then try to open a hot phone, the computer connected to the mobile phone network, and then released, a success!

Looking back above tips: This is a problem related to network connectivity network connectivity problem really is, but before the computer network why would not visit, also have not found the problem before can also access.

After using a mobile phone when it is released to open hotspots.

 

Guess you like

Origin www.cnblogs.com/yalong/p/11495661.html