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 (have (x86_64), need (arm64e))" trying to start FRET on an M1 machine #43

Closed
tflinkow opened this issue Sep 13, 2022 · 3 comments

Comments

@tflinkow
Copy link

tflinkow commented Sep 13, 2022

On an Apple M1 machine I get the following error when trying to start the application:

App threw an error during load
Error: dlopen(/Users/thomasflinkow/Downloads/fret-2.3/fret-electron/app/node_modules/leveldown/build/Release/leveldown.node, 0x0001): tried: '/Users/thomasflinkow/Downloads/fret-2.3/fret-electron/app/node_modules/leveldown/build/Release/leveldown.node' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1812)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1203:18)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5:1812)
    at Module.load (internal/modules/cjs/loader.js:992:32)
    at Module._load (internal/modules/cjs/loader.js:885:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
    at Module.require (internal/modules/cjs/loader.js:1032:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at load (/Users/thomasflinkow/Downloads/fret-2.3/fret-electron/app/node_modules/node-gyp-build/index.js:20:10)
    at Object.<anonymous> (/Users/thomasflinkow/Downloads/fret-2.3/fret-electron/app/node_modules/leveldown/binding.js:1:43)

I have attached the full output of running npm start -dd in file start.txt.


I have the required prerequisites installed:

thomasflinkow@Thomass-MacBook-Pro fret-2.3 % node --version
v16.16.0
thomasflinkow@Thomass-MacBook-Pro fret-2.3 % python --version
Python 3.10.6

and the installation seems to be successful too (attached is a file installation.txt containing the output of running npm run fret-install -dd).


I would appreciate any help in getting FRET to work on my machine and thank you in advance.

Please let me know if you need any other information.

@anmavrid
Copy link
Member

anmavrid commented Sep 13, 2022

Hi @flinkow,

FRET uses pouchdb and pouchdb has a dependency on the leveldown package. M1 machines need leveldown version ^6.0.3 but the current pouchdb configuration requires leveldown version 5.6.0 (see pouchdb/pouchdb#8526).

Until the pouchdb team fixes this dependency issue, you can apply the fix below.

After cloning FRET:

  1. cd fret/fret-electron
  2. npm run fret-install
  3. cd app (under fret/fret-electron/)
  4. npm install leveldown@latest
  5. Edit package-lock.json (under fret/fret-electron/app/)
  • Change leveldown dependency: “^5.4.0” under node_modules/level to “^6.0.3”
  • Change leveldown dependency: “5.6.0” under node_modules/pouchdb to “^6.0.3”
  1. cd ..
  2. npm start

Let us know if that works!

@tflinkow
Copy link
Author

Thank you very much for the quick reply and the proposed workaround (it works fine).

@anmavrid
Copy link
Member

Thank you. I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants