我本地的 Node 版本,16.2.0
首先执行,cnpm i @
vue/cli -g
cnpm i electrion -g
然后 vue create electron-demo, 选择的是 vue3
创建完之后,进入 electron-demo 文件夹,再执行 vue add electron-builder ,这里选择的是 Electron 13.0.0 版本,然后就报错了, 上面命令都是管理员执行的,我试了好几个版本的 node 都不行,然后各种搜报错原因,都没找到解决办法,不知道啥情况,求大神指点
npm ERR! code 1
npm ERR! path C:\Users\Administrator\Desktop\Demo\vue-electron\electron-demo\node_modules\electron
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm ERR! RequestError: certificate has expired
npm ERR! at ClientRequest.<anonymous> (C:\Users\Administrator\Desktop\Demo\vue-electron\electron-demo\node_modules\got\source\request-as-event-emitter.js:178:14)
npm ERR! at Object.onceWrapper (node:events:472:26)
npm ERR! at ClientRequest.emit (node:events:377:35)
npm ERR! at ClientRequest.origin.emit (C:\Users\Administrator\Desktop\Demo\vue-electron\electron-demo\node_modules\@szmarczak\http-timer\source\index.js:37:11)
npm ERR! at TLSSocket.socketErrorListener (node:_http_client:447:9)
npm ERR! at TLSSocket.emit (node:events:365:28)
npm ERR! at emitErrorNT (node:internal/streams/destroy:193:8)
npm ERR! at emitErrorCloseNT (node:internal/streams/destroy:158:3)
npm ERR! at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2024-01-31T08_23_49_643Z-debug.log
ERROR Error: command failed: npm install --loglevel error --legacy-peer-deps
Error: command failed: npm install --loglevel error --legacy-peer-deps
at ChildProcess.<anonymous> (D:\nvm\nvm\v16.2.0\node_modules\@vue\cli\lib\util\executeCommand.js:138:16)
at ChildProcess.emit (node:events:365:28)
at ChildProcess.cp.emit (D:\nvm\nvm\v16.2.0\node_modules\@vue\cli\node_modules\.store\
[email protected]\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1067:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)