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

Issue with M1 ARM Architecture #562

Open
baubakg opened this issue Sep 14, 2022 · 0 comments
Open

Issue with M1 ARM Architecture #562

baubakg opened this issue Sep 14, 2022 · 0 comments

Comments

@baubakg
Copy link

baubakg commented Sep 14, 2022

Hi There,

Just wanted to give the thumbs up about the node-java project and the M1-ARM Mac architecture.

Since I recently changed my computer to M1 ARM64 I started getting the error:

node:internal/modules/cjs/loader:1210
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: dlopen(/Users/me/pathToProject/simpleJSToJava/node_modules/java/build/Release/nodejavabridge_bindings.node, 0x0001): tried: 'Users/me/pathToProject/simpleJSToJava/node_modules/java/build/Release/nodejavabridge_bindings.node' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64)))
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1210:18)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/gandomi/Documents/development/misc/cypress/cypress-maven/simpleJSToJava/node_modules/java/lib/nodeJavaBridge.js:21:16)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12) {
  code: 'ERR_DLOPEN_FAILED'
}

I did however solve this by:

  1. Installing rosetta
  2. Start terminal with Rosetta
  3. re-Install x86 nodejs
  4. reset installation npm ci
  5. reinstall node java npm install java

I do not know if you plan to get this to work on arm64, but here is the workaround.

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

1 participant