node-mac-permissions
node-mac-permissions copied to clipboard
Error: incompatible architecture issue while run the application
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)
What version of Node.js are you using?
@codebytere Same issue in M2 chip as well... Node Version: v14.18.0 Electron Version: 15.1.2
Try Node.js v16 or newer -- earlier versions run with Rosetta.
@KishanBagaria @codebytere I have tried Node v16.18.0 & it's working fine now. Thank you for your great support :)
@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?
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.
uninstall and then run this npm i node-mac-permissions --build-from-source --target_arch=arm64 --fallback-to-build