【踩坑随笔】npm install 下载报错证书问题,换源没用

解决方案

npm install -g cnpm --registry=https://registry.npmmirror.com
cnpm install –save-dev electron

npm install 下载报错

npm error code ENOTFOUND
npm error syscall getaddrinfo
npm error errno ENOTFOUND
npm error network request to http://registry.cnpmjs.org/axios failed, reason: getaddrinfo ENOTFOUND registry.cnpmjs.org
npm error network This is a problem related to network connectivity.
npm error network In most cases you are behind a proxy or have bad network settings.
npm error network
npm error network If you are behind a proxy, please make sure that the
npm error network 'proxy' config is set properly.  See: 'npm help config'
npm error A complete log of this run can be found in: C:\Users\liron\AppData\Local\npm-cache\_logs\2025-02-28T10_05_22_174Z-debug-0.log
PS E:\Project\gitProject\weed_detection_project\frontend> npm config set registry https://registry.npmjs.org/
PS E:\Project\gitProject\weed_detection_project\frontend> npm install electron echarts axios
npm warn deprecated boolean@3.2.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn cleanup Failed to remove some directories [
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]
npm error command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm error RequestError: unable to verify the first certificate
npm error     at ClientRequest.<anonymous> npm error     at Object.onceWrapper (node:events:633:26)
npm error     at ClientRequest.emit (node:events:530:35)
npm error     at origin.emit timer\dist\source\index.js:43:20)
npm error     at emitErrorEvent (node:_http_client:104:11)
npm error     at TLSSocket.socketErrorListener (node:_http_client:518:5)
npm error     at TLSSocket.emit (node:events:518:28)
npm error     at emitErrorNT (node:internal/streams/destroy:170:8)
npm error     at emitErrorCloseNT (node:internal/streams/destroy:129:3)
npm error     at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
npm error     at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
npm error     at TLSSocket.emit (node:events:518:28)
npm error     at TLSSocket._finishInit (node:_tls_wrap:1078:8)
npm error     at ssl.onhandshakedone (node:_tls_wrap:864:12)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

RIKI_1

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值