VUE添加电子构建器:手动解决方法?
我以身作则(John Au-Yeung)遵循Vue.js 3的书。 在Chap4中,任务是使用Vue CLI插件电子构建器创建一个项目。 在创建标准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以通过错误吗? 我不知道如何。 感谢您的输入
I'm following the book Vue.js 3 By Example (John Au-Yeung).
In chap4, the task is Creating a project with Vue CLI Plugin Electron Builder.
I did below after the standard vue project was created:
vue add electron-builder
And I got below error:
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)
As I ran it in a company issued PC, I know it's related to some restrictions of download files.
Can i download the chromedriver manually to by pass the error?
I have no idea how.
Apprecaite your input
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我有用的东西是添加
electron_get_use_proxy = True
为安装,这是一个具有'npm'的示例:与'vue'有类似的东西
Something that worked for me was to add
ELECTRON_GET_USE_PROXY=true
for the install, this is an example with 'npm':There should be something similar with 'vue'