添加电子生成器:手动工作?



我正在学习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:dataprojectschap4node_moduleselectron-chromedriver
npm ERR! command failed
npm ERR! command C:WINDOWSsystem32cmd.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:dataprojectschap4node_modulesgotsourcerequest-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:dataprojectschap4node_modules@szmarczakhttp-timersourceindex.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)

我是在公司的电脑上运行的,我知道这与下载文件的一些限制有关。

我可以手动下载chromedriver来传递错误吗?我不知道怎么做。感谢您的输入

对我有用的是为安装添加ELECTRON_GET_USE_PROXY=true,这是一个使用'npm'的例子:

npx cross-env ELECTRON_GET_USE_PROXY=true npm install electron-builder

应该有类似的东西与'vue'

最新更新