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

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日

悬赏问题

  • ¥15 MATLAB代码补全插值
  • ¥15 Typegoose 中如何使用 arrayFilters 筛选并更新深度嵌套的子文档数组信息
  • ¥15 前后端分离的学习疑问?
  • ¥15 stata实证代码答疑
  • ¥50 husky+jaco2实现在gazebo与rviz中联合仿真
  • ¥15 dpabi预处理报错:Error using y_ExtractROISignal (line 251)
  • ¥15 在虚拟机中配置flume,无法将slave1节点的文件采集到master节点中
  • ¥15 husky+kinova jaco2 仿真
  • ¥15 zigbee终端设备入网失败
  • ¥15 金融监管系统怎么对7+4机构进行监管的