-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
Cannot find module 'appdmg' #2807
Comments
I faced a similar issue what I did was install appdmg as a dev dependency and that solved my issue. I think the electron team has to find a fix for it though. |
I've faced with the same issue. It works without any problem for a while. |
Same issue here. Any fix ? Adding appdmg as dev dependency result in node-gyp error. |
My workaround is to specify python version for GitHub action: - uses: actions/setup-python@v4
with:
python-version: '3.10' |
Thanks to #2176 (comment) I removed |
Using Python 3.11 instead of the bundled Python 3.12 fixed it for me using the Appears related to LinusU/node-appdmg#234 and nodejs/node-gyp#2869 |
Summary: [ENG-5678](https://linear.app/comm/issue/ENG-5678) The general error that breaks the github CI is the same as in this [issue](electron/forge#2807) - `distutils` was removed in a newer version of python and so one of the dependencies postinstall script breaks because of that. This diff fixes that by additionaly installing an older (3.10) version of python before installing the dependencies. Note that I'm still not sure why the CI is sometimes successful but I'm hoping this should fix the errors. INFO: Most native (written in C++) js modules are built with something called `node-gyp`. It's written in python and used at build time in postinstall scripts. That's why we need to mess with python. Test Plan: Tested on a GitHub fork. Without this changes CI failed. After this changes tried running it 3 times and it succeded every time. Reviewers: atul, ashoat, tomek Reviewed By: ashoat Subscribers: wyilio Differential Revision: https://phab.comm.dev/D9760
Try to resolve appdmg module can not found issue in ci/cd pipeline electron/forge#2807 (comment)
This was driving me crazy today trying to track down. Thanks for posting this @dtcooper. Locking in Python |
Glad it helped! @blee-tetrascience :) |
I've resolved this issue on
|
It looks like GHA mac runner has installed brew and python in some new way which is now giving an error. The New error:
|
Pre-flight checklist
Electron Forge version
6.0.0-beta.63
Electron version
v17.4.0
Operating system
12.3.1
Last known working Electron Forge version
No response
Expected behavior
I am trying to build a dmg installer. I install the package and expected it to work since the documentation you provided is pretty limited.
Actual behavior
I installed @electron-forge/maker-dmg then I installed appdmg and verified it was installed but now I still get this error.
`
An unhandled error has occurred inside Forge:
An error occured while making for target: dmg
Cannot find module 'appdmg'
Require stack:
Error: Cannot find module 'appdmg'
Require stack:
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at build (/Users/user/user/Workspaces/personal/PokeTrax/node_modules/electron-installer-dmg/src/index.js:121:10)
at MakerDMG.make (/Users/user/Workspaces/personal/PokeTrax/node_modules/@electron-forge/maker-dmg/src/MakerDMG.ts:32:18)
at /Users/user/Workspaces/personal/PokeTrax/node_modules/@electron-forge/core/src/api/make.ts:217:31`
Steps to reproduce
Project is Opensource and main is the lastest
https://github.com/jgunzelman88/PokeTrax
just run npm run make
Thanks for the help!!
Additional information
No response
The text was updated successfully, but these errors were encountered: