欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 新闻 > 资讯 > npm使用了代理,但是代理软件已经关闭导致创建失败

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

2025/2/23 7:37:30 来源:https://blog.csdn.net/Yqha1/article/details/145796027  浏览:    关键词:npm使用了代理,但是代理软件已经关闭导致创建失败

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

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,刷新状态

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词