【发布时间】:2022-11-10 13:50:52
【问题描述】:
我正在关注 Vue.js 3 By Example (John Au-Yeung) 一书。 在第 4 章中,任务是使用 Vue CLI Plugin Electron Builder 创建一个项目。 在创建标准 vue 项目后,我做了以下操作:
vue add electron-builder
我得到以下错误:
npm ERR! code 1
npm ERR! path C:\data\projects\chap4\node_modules\electron-chromedriver
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./download-chromedriver.js
npm ERR! node:internal/process/promises:279
npm ERR! triggerUncaughtException(err, true /* fromPromise */);
npm ERR! ^
npm ERR!
npm ERR! GotError [RequestError]: self signed certificate in certificate chain
npm ERR! at ClientRequest.<anonymous> (C:\data\projects\chap4\node_modules\got\source\request-as-event-emitter.js:178:14)
npm ERR! at Object.onceWrapper (node:events:642:26)
npm ERR! at ClientRequest.emit (node:events:539:35)
npm ERR! at ClientRequest.origin.emit (C:\data\projects\chap4\node_modules\@szmarczak\http-timer\source\index.js:37:11)
npm ERR! at TLSSocket.socketErrorListener (node:_http_client:454:9)
npm ERR! at TLSSocket.emit (node:events:527:28)
npm ERR! at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR! at emitErrorCloseNT (node:internal/streams/destroy:122:3)
当我在公司发行的PC上运行它时,我知道它与下载文件的一些限制有关。
我可以手动下载 chromedriver 以绕过错误吗? 我不知道怎么做。 感谢您的输入
【问题讨论】: