Vue3安装Electron报错 Command failed 问题解决

安装Electron遇到下面的问题:

[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error F:\myobj\node_modules\electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: F:\myobj\node_modules\electron
Output:
RequestError: read ECONNRESET
    at ClientRequest.

一看又是神奇的国度,需要特殊的代理,于是输入以下命令:

 yarn config set electron_mirror https://cdn.npm.taobao.org/dist/electron/

再运行一遍:

[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
$ electron-builder install-app-deps
  • electron-builder  version=23.6.0
  • loaded configuration  file=package.json ("build" field)
Done in 56.56s.

好了,完美!

你可能感兴趣的:(electron,javascript,前端)