npm使用了代理,但是代理软件已经关闭导致创建失败

如果在关闭前打开了vscode,此时vscode中的终端没有刷新,就会出现这个问题,最开始会一直转圈圈,直到超时,然后出现该报错

bash 复制代码
❯ npm create vue@latest
npm error code ECONNREFUSED
npm error syscall connect
npm error errno ECONNREFUSED
npm error FetchError: request to https://registry.npmjs.org/create-vue failed, reason: connect ECONNREFUSED 127.0.0.1:12334
npm error     at ClientRequest.<anonymous> (/home/ying/.nvm/versions/node/v22.13.1/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm error     at ClientRequest.emit (node:events:524:28)
npm error     at emitErrorEvent (node:_http_client:104:11)
npm error     at _destroy (node:_http_client:898:9)
npm error     at onSocketNT (node:_http_client:918:5)
npm error     at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
npm error   code: 'ECONNREFUSED',
npm error   errno: 'ECONNREFUSED',
npm error   syscall: 'connect',
npm error   address: '127.0.0.1',
npm error   port: 12334,
npm error   type: 'system'
npm error }
npm error
npm error If you are behind a proxy, please make sure that the
npm error 'proxy' config is set properly.  See: 'npm help config'
npm error A complete log of this run can be found in: /home/ying/.npm/_logs/2025-02-22T07_28_54_852Z-debug-0.log

解决办法

重新打开vscode,刷新状态

相关推荐
潍坊老登1 天前
关于 number类型从vue端传到golang后端是float而不是int的事
前端
茶底世界之下1 天前
你的 Mac 里,藏着一支 AI 开发团队
前端·javascript
不爱说话郭德纲1 天前
出门在外收到任务,我用 TRAE SOLO 把电脑“叫醒”干活
前端·ai编程
前端Hardy1 天前
这个前端动画库,火了!
前端·javascript
小林攻城狮1 天前
Vite项目使用@turbodocx/html-to-docx报错问题排查与解决方案
前端·ai编程
Asmewill1 天前
LangGraph学习笔记六(Stream流式输出)
前端
哈撒Ki1 天前
前端性能优化汇总
前端·面试
Asmewill1 天前
LangGraph学习笔记七(checkpointer)
前端
前端小木屋1 天前
uniapp与蓝牙设备连接详细步骤
前端·微信小程序
yingyima1 天前
Go 语言定时任务速查手册:实现延迟与周期任务的高效方法
前端