-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not building on M1 mac with Monterey #1691
Comments
just added a pullrequest anybody with this issue can add
as a depency in his package.json to get working again no need for python path in env no changeing files.. |
Is there any update on this issue? I cannot build for in my MacBook M1 |
The default branch of this repo, does depend on |
But acturally, it doesn't work on macOS now. According to github issue,the bug would be fixed by offical team. nklayman/vue-cli-plugin-electron-builder#1691
The GitHub-hosted runners began experiencing issues while building macOS desktop distributions, exclusively affecting the macOS environment. The Ubuntu and Windows environments remained unaffected. The logs highlighted the absence of Python in the macOS environment, which resulted in build failure: ```sh Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT ``` Since the `electron-builder` package uses Python scripts to create DMG disk images for macOS distributions, Python is needed for building the application. However, electron-builder uses Python 2.X meanwhile modern macOS versions have removed Python 2.X from the operating system on default installation. Although this issue was resolved in `electron-builder` version 23,, `vue-cli-plugin-electron-builder` continues to use version 22. Due to a lack of maintenance, the package is unlikely to receive updates. This commit forces `vue-cli-plugin-electron-builder` to use the latest `electron-builder` which resolves the macOS distribution build failure. In CI process, GitHub-hosted runners start to fail when building macOS desktop distributions. It is only observered in the macOS environment while the application is built successfully in both the Ubuntu and Windows environments. The error message in the logs indicated that Python was not found in the macOS environment: ```sh Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT ``` `electron-builder` package uses Python scripts for certain operations, specifically for creating DMG disk images for macOS distributions. As a result, Python is a necessary dependency when building the application for macOS. `electron-builder` has fixed this starting from version 23, but vue-cli-plugin-electron-builder still refers to version 22 and it is unmaintained and not likely to get updates. The solution is to add a step in the GitHub Actions workflow to set up Python in the macOS environment. `actions/setup-python` sets up the Python environment in the runner if the OS is macOS. This change does not impact the Ubuntu and Windows environments as the setup-python step is conditionally executed only for macOS. The addition of Python to the macOS environment in CI process has resolved the build failure issue for the macOS distribution. See also: - electron-userland/electron-builder#6606 - electron-userland/electron-builder#6726 - electron-userland/electron-builder#6732 - nklayman/vue-cli-plugin-electron-builder#1691 - nklayman/vue-cli-plugin-electron-builder#1701
The GitHub-hosted runners began experiencing issues while building macOS desktop distributions, exclusively affecting the macOS environment. The Ubuntu and Windows environments remained unaffected. The logs highlighted the absence of Python in the macOS environment, which resulted in build failure: ```sh Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT ``` Since the `electron-builder` package uses Python scripts to create DMG disk images for macOS distributions, Python is needed for building the application. However, electron-builder uses Python 2.X meanwhile modern macOS versions have removed Python 2.X from the operating system on default installation. Although this issue was resolved in `electron-builder` version 23,, `vue-cli-plugin-electron-builder` continues to use version 22. Due to a lack of maintenance, the package is unlikely to receive updates. This commit forces `vue-cli-plugin-electron-builder` to use the latest `electron-builder` which resolves the macOS distribution build failure. In CI process, GitHub-hosted runners start to fail when building macOS desktop distributions. It is only observered in the macOS environment while the application is built successfully in both the Ubuntu and Windows environments. The error message in the logs indicated that Python was not found in the macOS environment: ```sh Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT ``` `electron-builder` package uses Python scripts for certain operations, specifically for creating DMG disk images for macOS distributions. As a result, Python is a necessary dependency when building the application for macOS. `electron-builder` has fixed this starting from version 23, but vue-cli-plugin-electron-builder still refers to version 22 and it is unmaintained and not likely to get updates. The solution is to add a step in the GitHub Actions workflow to set up Python in the macOS environment. `actions/setup-python` sets up the Python environment in the runner if the OS is macOS. This change does not impact the Ubuntu and Windows environments as the setup-python step is conditionally executed only for macOS. The addition of Python to the macOS environment in CI process has resolved the build failure issue for the macOS distribution. See also: - electron-userland/electron-builder#6606 - electron-userland/electron-builder#6726 - electron-userland/electron-builder#6732 - nklayman/vue-cli-plugin-electron-builder#1691 - nklayman/vue-cli-plugin-electron-builder#1701
Describe the bug
apple removed python 3 support which prevents bundeling the dmg
see electron-userland/electron-builder#6617
fixed in electron-builder v23
To Reproduce
Steps to reproduce the behavior:
try building an mac app
Expected behavior
app builds without error
Additional context
for People running into this here is a workaround:
EDIT: Workarround is not needed
just add
"vue-cli-plugin-electron-builder": "git://github.com/spuky/vue-cli-plugin-electron-builder#b6826fc",
to your package.json to install with upgraded dependency
add a
.env
file to your project with your Python 3 location:PYTHON_PATH=/opt/homebrew/bin/python3
gets rid of the first error:
Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
then edit core.py the file in the sceond error (might be in node_modules/electron-builder or node_modules/vue-cli-plugin-electron-builder depending on the fact if you tried upgrading electron builder yourself..) you run into
Error: Exit code: 1. Command failed: /opt/homebrew/bin/python3 /Users/spuky/webstuff/myproject/node_modules/electron-builder/node_modules/dmg-builder/vendor/dmgbuild/core.py
Traceback (most recent call last):
File "/Users/spuky/webstuff/myproject/node_modules/electron-builder/node_modules/dmg-builder/vendor/dmgbuild/core.py", line 7, in
reload(sys) # Reload is a hack
NameError: name 'reload' is not defined
to read like this:
`# -- coding: utf-8 --
from future import unicode_literals
import os
import re
import sys
from importlib import reload
reload(sys) # Reload is a hack
#sys.setdefaultencoding('UTF8')`
new stuff is
from importlib import reload
and the comented
sys.setdefaultencoding('UTF8')
line...
then your app should build...
Resolution:
Bumping the dependency of electron-builder to v23 should fix the issue..
The text was updated successfully, but these errors were encountered: