在aliyun linux上npm install失败

今天在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

 

参考安装pm2

posted @   johnny_zhao  阅读(209)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2020-12-02 1032. Stream of Characters
点击右上角即可分享
微信分享提示