当我试图运行comman
npm install http
字符串
它挂了一段时间才给我这个错误
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://localhost/http failed, reason:
npm ERR! at ClientRequest.<anonymous> (C:\Users\Barth\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! at ClientRequest.emit (node:events:514:28)
npm ERR! at _destroy (node:_http_client:875:13)
npm ERR! at onSocketNT (node:_http_client:895:5)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! FetchError: request to https://localhost/http failed, reason:
npm ERR! at ClientRequest.<anonymous> (C:\Users\Barth\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! at ClientRequest.emit (node:events:514:28)
npm ERR! at _destroy (node:_http_client:875:13)
npm ERR! at onSocketNT (node:_http_client:895:5)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! type: 'system',
npm ERR! requiredBy: '.'
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'
型
正如你所看到的,它试图从https://localhost/http安装它是什么原因导致这一点,我如何修复这一点
我已经尝试完全恢复节点
1条答案
按热度按时间p5fdfcr11#
确保您的npm注册表设置正确。您可以使用以下命令检查和更新注册表:
第一个月
npm config set registry https://registry.npmjs.org/
个我希望这也能对其他人有所帮助。