Skip to content
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

Error: incompatible architecture issue while run the application #49

Open
akbar-animaker opened this issue Oct 12, 2022 · 7 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@akbar-animaker
Copy link

Electron Version: 19.1.0
Apple M1 chip

while run the application I am facing this issue... how to solve that? is there any solution for this issue?

`Error: dlopen(/Users/mine/Documents/proj/node_modules/node-mac-permissions/build/Release/permissions.node, 0x0001): tried: '/Users/mine/Documents/proj/node_modules/node-mac-permissions/build/Release/permissions.node' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
    at process.func [as dlopen] (noe:electron/js2c/asar_bundle:5:1812)
    at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1812)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at bindings (/Users/animchnlap281/Documents/Vmaker_Mac/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/Users/mine/Documents/proj/node_modules/node-mac-permissions/index.js:1:40)
@akbar-animaker akbar-animaker changed the title Error: dlopen while run the application Error: incompatible architecture issue while run the application Oct 12, 2022
@codebytere codebytere self-assigned this Oct 17, 2022
@codebytere codebytere added the bug Something isn't working label Oct 17, 2022
@codebytere
Copy link
Owner

What version of Node.js are you using?

@mridulsaini98
Copy link

@codebytere
Same issue in M2 chip as well...
Node Version: v14.18.0
Electron Version: 15.1.2

@KishanBagaria
Copy link
Contributor

Try Node.js v16 or newer -- earlier versions run with Rosetta.

@mridulsaini98
Copy link

@KishanBagaria @codebytere
I have tried Node v16.18.0 & it's working fine now. Thank you for your great support :)

@mridulsaini98
Copy link

@KishanBagaria
It's working fine on M2 chip with:
Electron: v11.5.0
Node: v14.18.0

But with:
Electron: v15.1.2
Node: v14.18.0

It's not working. Could you please tell me why is it so?

@KishanBagaria
Copy link
Contributor

Electron/Node didn't add support for arm64 (Apple Silicon chips) until a later version so macOS is using Rosetta to run the x86 binaries causing issues.

@mister-10k
Copy link

uninstall and then run this npm i node-mac-permissions --build-from-source --target_arch=arm64 --fallback-to-build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants