Open rubyte-s opened 3 years ago
+1
How is the progress of this issue🤔️
Did you got any solution for this issue. I am alos facing this issue on M1 Mac.
How are you triggering this issue? I'm on an M1, and on npm install node-gyp-build
triggers and compiles from source happily.
How are you triggering this issue? I'm on an M1, and on npm install
node-gyp-build
triggers and compiles from source happily.
the error will be raised at runtime and not at the build/compile time.
How are you triggering the error? I am on M1 and have no trouble using this package.
The build triggers on install, which is where your error is coming from.
I'm also seeing the same error at runtime on a M1. Install/build works fine and the error happens only during runtime when ffi-napi
is imported. If I force my process to run under Rosetta everything works as expected. cc: @msynk
@TimothyJones I'm not entirely sure how the prebuild system works, but it looks like arm64 for darwin does not exist for ref-napi@3.0.3. Should i expect it to build on my mahcine?
ls -la node_modules/ref-napi/prebuilds/
total 0
drwxr-xr-x 7 andrew staff 224 Dec 11 10:16 .
drwxr-xr-x 19 andrew staff 608 Dec 11 10:16 ..
drwxr-xr-x 4 andrew staff 128 Dec 11 10:16 darwin-x64
drwxr-xr-x 4 andrew staff 128 Dec 11 10:16 linux-arm64
drwxr-xr-x 4 andrew staff 128 Dec 11 10:16 linux-x64
drwxr-xr-x 4 andrew staff 128 Dec 11 10:16 win32-ia32
drwxr-xr-x 4 andrew staff 128 Dec 11 10:16 win32-x64
Error: No native build was found for platform=darwin arch=arm64 runtime=electron abi=85 uv=1 armv=8 libc=glibc node=12.18.3 electron=11.5.0
loaded from: /Applications/Example.app/Contents/Resources/app-arm64.asar/node_modules/ref-napi
It looks like installing packages with npm_config_build_from_source=true
in the environment seems to bypass prebuilds and works for me
I'm seeing this same issue, but npm_config_build_from_source=true npm install
doesn't resolve it. Is there anything else that I could try?
This is what I'm getting at runtime:
Uncaught Exception:
Error: dlopen(/Volumes/ElectronApp-arm64/ElectronApp.app/Contents/Resources/app.asar.unpacked/node_modules/ref-napi/build/Release/binding.node, 0x0001): tried: '/Volumes/ElectronApp-arm64/ElectronApp.app/Contents/Resources/app.asar.unpacked/node_modules/ref-napi/build/Release/binding.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/binding.node' (no such file), '/usr/lib/binding.node' (no such file)
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1199:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2027)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:9418)
at load (/Volumes/ElectronApp-arm64/ElectronApp.app/Contents/Resources/app.asar/node_modules/node-gyp-build/index.js:21:10)
at Object.<anonymous> (/Volumes/
Update: I was able to resolve the issue. I am using electron-builder and needed to use buildDependenciesFromSource
in the config.
Maybe this helps someone, not sure. I only had this with Node < version 17. With version 17 I have other issues I am looking into right now, though
How is the progress of this issue
Error: No native build was found for platform=darwin arch=arm64 runtime=electron abi=85 uv=1 armv=8 libc=glibc node=12.18.3 electron=11.0.3 loaded from: /Users/shaun/.vscode-exploration/extensions/intersystems.language-server-1.0.5/server/node_modules/ref-napi