今天在ESC上使用npm进行安装,出现以下错误:
npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://registry.npmjs.org/pm2 failed, reason: 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'
解决办法:修改境像
npm config set registry https://registry.npmmirror.com
检查是否设置成功:
npm config get registry
再进行安装:
npm install pm2 -g
标签:npm,install,ERR,registry,aliyun,pm2,config,network From: https://www.cnblogs.com/johnnyzhao/p/17871752.html