npm install pnpm -g 报错的解决方法

npm install pnpm -g 报错的解决方法

bash 复制代码
npm error code ETIMEDOUT
npm error errno ETIMEDOUT
npm error network request to https://registry.npmjs.org/pnpm failed, reason:
npm error network This is a problem related to network connectivity.
npm error network In most cases you are behind a proxy or have bad network setti
ngs.
npm error network
npm error network If you are behind a proxy, please make sure that the
npm error network 'proxy' config is set properly.  See: 'npm help config'
npm error A complete log of this run can be found in: C:\Users\zhangchang\AppDat
a\Local\npm-cache\_logs\2024-08-14T09_39_08_962Z-debug-0.log

解决方法:

命令行中执行这两个命令,然后再执行npm install pnpm -g

bash 复制代码
npm config get proxy
npm config rm https-proxy
相关推荐
大飞记Python32 分钟前
部门管理|“编辑部门”功能实现(Django5零基础Web平台)
前端·数据库·python·django
tsumikistep2 小时前
【前端】前端运行环境的结构
前端
你的人类朋友2 小时前
【Node】认识multer库
前端·javascript·后端
Aitter2 小时前
PDF和Word文件转换为Markdown的技术实现
前端·ai编程
mapbar_front2 小时前
面试问题—上家公司的离职原因
前端·面试
昔人'3 小时前
css使用 :where() 来简化大型 CSS 选择器列表
前端·css
昔人'3 小时前
css `dorp-shadow`
前端·css
流***陌3 小时前
扭蛋机 Roll 福利房小程序前端功能设计:融合趣味互动与福利适配
前端·小程序
烛阴4 小时前
用 Python 揭秘 IP 地址背后的地理位置和信息
前端·python
前端开发爱好者4 小时前
尤雨溪官宣:"新玩具" 比 Prettier 快 45 倍!
前端·javascript·vue.js