vue-cli-plugin-electron-builder: macOS 12.3 (21E230) Exit code: ENOENT. spawn /usr/bin/python ENOENT
at /Users/xxx/web/xxx/node_modules/builder-util/src/util.ts:133:18
at exithandler (node:child_process:406:5)
at ChildProcess.errorhandler (node:child_process:418:5)
at ChildProcess.emit (node:events:526:28)
at ChildProcess.emit (node:domain:475:12)
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Please upgrade electron-builder 23.02 +
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 9
- Comments: 28
Commits related to this issue
- WCH-OPS: upgrade electron-builder and related dependencies to fix build error see: https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1701 — committed to emartech/request-rocket by VPecc 2 years ago
- Fix mac build error https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1701 — committed to neanes/neanes by danielgarthur 2 years ago
- :green_heart: 修复macos electron-builder 构建问题:https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1701 — committed to rubickCenter/rubick by muwoo a year ago
- Fix macOS desktop build failure in CI The GitHub-hosted runners began experiencing issues while building macOS desktop distributions, exclusively affecting the macOS environment. The Ubuntu and Windo... — committed to undergroundwires/privacy.sexy by undergroundwires a year ago
- fixed: Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT 备注: ENOENT 表示 "No such file or directory" 参考: https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1701 — committed to zqhong/BilibiliVideoDownload by zqhong a year ago
- Fix macOS desktop build failure in CI The GitHub-hosted runners began experiencing issues while building macOS desktop distributions, exclusively affecting the macOS environment. The Ubuntu and Windo... — committed to LarrMarburger/privacy.sexy by LarrMarburger a year ago
Temporary (and npm native) solution to this is npm overrides (requires npm >= v8):
After changing
package.json
, I did (there may be a less ‘brutal’ approach):result:
Aaand build on mac os 12.3.1 works again 😃
There is a simple solution 😂:
To install python 2.7, And get the installation path (for example: /XXX/versions/2.7/bin/python);
Open “YourProjectPath/node_modules/dmg-builder/out/dmg.js”, find “/usr/bin/python”, replace with “/XXX/versions/2.7/bin/python”.
As a workaround install python 2.7 with pyenv then set PYTHON_PATH when runinng
npm run electron:build
like this:https://github.com/electron-userland/electron-builder/issues/6726#issuecomment-1073262721
not working its update to 22.14.13
The problem has been solved. Thank you very much !
就这个最有用,那个改PYTHON_PATH也无效
Never mind. My npm was out of date. I was still using npm v 6.14.8 which doesn’t support overrides. Updating npm to the latest version resolved this.
@danline Ah yes. Overrides require >= npm 8. Should have mentioned this. Sorry for the confusion.
Install python 2 first
$ which python
$ PYTHON_PATH=/path/to/python electron-builder …
Support the m1pro version of python2.7 Where can I download it? I can’t find it
looks,must upgrade electron-build in vue-cli-plugin-electron-builder