dsh web fails on OpenHarmony/arm64: No usable native binding found for node-addon-require-builtin-openharmony-arm64
#8097
zixuan-chen
started this conversation in
General
Replies: 2 comments 1 reply
|
For me, it's |
0 replies
|
Same for node-addon-require-builtin-linux-x64-gnu |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
On HarmonyOS PC (OpenHarmony, arm64, musl), the
dshCLI installs fine anddsh --version/dsh --helpwork, but every profile-booting command fails(
dsh web,dsh tui,dsh headless, and evendsh --profile web --dump-config-schema).The failure comes from the native loader
node-addon-native-custom-loader→node-addon-require-builtin, which has nobinding for this platform.
Environment
HongMeng Kernel 1.13.0process.platformopenharmonyprocess.archarm64/lib/ld-musl-aarch64.so.1;process.report().header.glibcVersionRuntimeis undefined, no glibc present)dshversion0.1.7-rc.2(npm@deepseek-ai/dsh)node-addon-require-builtin0.1.6v24.13.0— ABI/modules137v26.10.0— ABI/modules147Both Node versions fail identically, so this is not an ABI mismatch but a
missing platform target.
Steps to reproduce
Actual behavior
The loader reports three failed
attempts:source: 'optional-package', requestnode-addon-require-builtin-openharmony-arm64→MODULE_NOT_FOUNDsource: 'local-build', path.../node-addon-require-builtin/build/nodeabi/node-v147-openharmony-arm64/require_builtin.node→
MODULE_NOT_FOUNDsource: 'local-build', path.../node-addon-require-builtin/build/napi/napi-v9-openharmony-arm64/require_builtin.node→
MODULE_NOT_FOUNDRoot cause
node-addon-require-builtin@0.1.6declares theseoptionalDependencies:There is no
openharmonyentry, and per the package README, published installs"do not ship native sources and fail closed" — so no local compilation fallback
either.
In
node-addon-native-custom-loader/lib/index.js:So the requested suffix is
openharmony-arm64, which no package provides. Theonly escape hatch exposed is
NARB_BACKEND(choosesnapivsnodeabi); thereis no environment variable to override the platform/libc suffix
(
NARB_DISABLE_OPTIONAL_PACKAGE,NARB_DISABLE_LOCAL_BUILD,NARB_DISABLE_NATIVE_CACHE,NARB_NATIVE_CACHE_DIRare the others, none ofwhich help).
Note: this also affects musl Linux
runtimeSuffix()already models a musl variant (linux-arm64-musl), but nomusl package is published — only
*-gnu. Alpine Linux and other musl distrosshould hit the same dead end. Fixing the musl gap therefore helps more than
just OpenHarmony.
Suggested fixes (in order of effort)
node-addon-require-builtin-openharmony-arm64(musl, Node-API).OpenHarmony's kernel exposes a Linux-compatible syscall ABI, so a
musl-targeted N-API build is likely to load as-is, especially for the
napibackend (ABI-stable, no per-Node-version rebuild).Bonus: also ship
node-addon-require-builtin-linux-{x64,arm64}-musl— thesame artifact, tested on Alpine.
NARB_PLATFORM_OVERRIDE=linux-arm64-musl, so advanced users onunreleased-for platforms can borrow a compatible binding instead of getting
a hard failure. This is cheap and unblocks any future niche platform
without a release cycle.
to a pure-JS path (or a clear "unsupported platform" diagnostic) rather
than an uncaught exception during
host preparation.Workarounds tried
NARB_BACKEND=napiandNARB_BACKEND=nodeabi— same failure (both need aopenharmony-arm64artifact that does not exist).Currently no
dshprofile can boot on this platform; only--versionand--helpwork, since they do not load native bindings.Additional context
Node.js itself is not an OpenHarmony target upstream; it reaches these devices
through community distributions (here:
harmonybrew, which ships aprebuilt musl Node for OpenHarmony/arm64). I understand supporting a platform
that upstream Node does not officially target may be out of scope — in that
case, option 2 (a documented platform override) alone would let the community
self-serve without a formal support commitment. Happy to test any candidate
musl/arm64 build on this machine and report back.
All reactions