weixin_48246197 2021-10-12 21:52 采纳率: 100%
浏览 44
已结题

node.js问题:就是现在下载不了第三方的包了,也不知道怎么解决

//现在是我好像在终端输入了设置代理的命令npm config set proxy http://127.0.0.l和npm config set https-proxy http://127.0.0.1,然后我就不能下载第三方包了,求解

npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to http://registry.npmjs.org/moment failed, reason: connect ECONNREFUSED 127.0.0.1:80
npm ERR!     at ClientRequest.<anonymous> (D:\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR!     at ClientRequest.emit (events.js:400:28)
npm ERR!     at Socket.socketErrorListener (_http_client.js:475:9)
npm ERR!     at Socket.emit (events.js:400:28)
npm ERR!     at emitErrorNT (internal/streams/destroy.js:106:8)
npm ERR!     at emitErrorCloseNT (internal/streams/destroy.js:74:3)
npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:82:21)
npm ERR!  FetchError: request to http://registry.npmjs.org/moment failed, reason: connect ECONNREFUSED 127.0.0.1:80
npm ERR!     at ClientRequest.<anonymous> (D:\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR!     at ClientRequest.emit (events.js:400:28)
npm ERR!     at Socket.socketErrorListener (_http_client.js:475:9)
npm ERR!     at Socket.emit (events.js:400:28)
npm ERR!     at emitErrorNT (internal/streams/destroy.js:106:8)
npm ERR!     at emitErrorCloseNT (internal/streams/destroy.js:74:3)
npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:82:21) {
npm ERR!   type: 'system',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   code: 'ECONNREFUSED'
npm ERR! }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\79274\AppData\Roaming\npm-cache\_logs\2021-10-12T13_34_16_713Z-debug.log
  • 写回答

2条回答 默认 最新

  • CSDN专家-微编程 2021-10-12 23:13
    关注

    你输入这条命令,并执行

     npm config set registry https://registry.npm.taobao.org
    

    然后再使用npm下载东西试试

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 10月20日
  • 已采纳回答 10月12日
  • 创建了问题 10月12日

悬赏问题

  • ¥20 西门子S7-Graph,S7-300
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改