本文介绍: 然后执行cnpm install –save-dev electron 成功了。百度和谷歌搜索,各种换源加代理都没解决。这个网站,根据指导,安装定制的cnpm管理工具。
add electron --save-dev --registry=https:/registry.npm.taobao.org
npm ERR! code 1
npm ERR! path C:Usersxxxxxxxxxappnode_moduleselectron
npm ERR! command failed
npm ERR! command C:windowssystem32cmd.exe /d /s /c node install.js
npm ERR! RequestError: unable to verify the first certificate
npm ERR!     at ClientRequest.<anonymous> (C:Usersxxxxxxxxxappnode_modulesgotdistsourcecoreindex.js:970:111)
npm ERR!     at Object.onceWrapper (node:events:628:26)
npm ERR!     at ClientRequest.emit (node:events:525:35)
npm ERR!     at origin.emit (C:Usersxxxxxxxxxappnode_modules@szarczakhttp-timerdistsourceindex.js:43:20)
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:502:9)
npm ERR!     at TLSSocket.emit (node:events:513:28)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR!     at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)
npm ERR!     at TLSSocket.emit (node:events:513:28)
npm ERR!     at TLSSocket._finishInit (node:_tls_wrap:959:8)
npm ERR!     at ssl.onhandshakedone (node:_tls_wrap:743:12)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersxxxxxxxxxAppDataLocalnpm-cache_logs2023-10-18T08_03_12_856Z-debug-0.log

百度和谷歌搜索,各种换源加代理都没解决。 最后找到了https://npmmirror.com/这个网站,根据指导,安装定制的cnpm管理工具npm install -g cnpm --registry=https://registry.npmmirror.com

然后执行cnpm install –save-dev electron 成功了。

原文地址:https://blog.csdn.net/xcdm100/article/details/135651056

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_57768.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注