-
Notifications
You must be signed in to change notification settings - Fork 7
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
Unhandled rejection in Forge #17
Comments
I don't use forge myself, so I am not certain on the exact solution here. That error doesn't say anything about why it failed, so I don't have any ideas on how to fix the rebuild. But I think there is a way to tell forge to not rebuild this library. This library already provides electron compatible binaries, with os targets chosen for maximum compatibility. |
Thanks for getting back to me on this Julian. There is a rebuild option one can use, both in the make command and in the forge config file. I have tried both, but get the same result. It's good to know that electron compatible binaries are in the library. I am trying to create an x64 package on an arm64 machine. This might be the problem. |
@RichardFoss We had a similar error which was solved by downgrading Python from 3.12.x to 3.11.x Try checking which Python version you're running. I think there is a conflict/incompatibility between the version of node-gyp that electron/forge uses and Python 3.12 |
Thanks, I appreciate you getting back to me about this issue! I do have Python 3.11 installed. I eventually decided to find an Intel Mac machine and built on that. I haven't been able to build an x64 package on a Mac silicon machine. |
Hi again, I'm having another go at generating my app package for x64 Mac on an arm64 Mac. I have done the following:
|
This is suspicious to me. This means it decided to recompile the library rather than use the prebuild version. If there is a locally compiled version, it will always use that instead of the prebuilds (the assumption is that it was compiled because the prebuild failed to load, most likely because of minimum os requirements. or its a development build of the module) In me experience, tools do not provide the correct flags to get node-gyp to compile for a different architecture than node is running. Could you try deleting the node_modules folder and doing step 5 again? |
Thank you very much for the quick response! I removed node_modules, cleared the npm cache and did an npm install. Unfortunately had the same error. Here it is more fully: |
From your text - "In me experience, tools do not provide the correct flags to get node-gyp to compile for a different architecture than node is running.". So node is running on the x64 simulated machine, and will build an x64 midi.node. It seems that the loader recognizes this - "Release/midi.node' (mach-o file, but is an incompatible architecture (have (x86_64), ". But then why would it need an arm64 build? - "need (arm64e)))"? |
It would seem that dlopen wants to load an arm64 midi.node? |
Good point, that suggests that it is actually running an arm64 version of node. |
Hi, I have been using your great MIDI module for some time. I recently moved to Electron, and my code runs when started from the VSCode terminal. However when using Forge to package my application, I get the following error:
An unhandled rejection has occurred inside Forge:
Error: node-gyp failed to rebuild '/private/var/folders/nm/rd3fmgk15c30njwgmn41h3wm0000gp/T/electron-packager/darwin-x64/ImmerGo-MOTU-darwin-x64-6kin7Y/Electron.app/Contents/Resources/app/node_modules/@julusian/midi'
I do have Python 3 installed and have used node-gyp successfully.
The text was updated successfully, but these errors were encountered: