Open HeyITGuyFixIt opened 2 weeks ago
I believe the issue is that edge-js is a node addon that uses Node.JS and V8's APIs directly (e.g. https://nodejs.org/api/addons.html#c-addons) which are not ABI stable and deno does not support.
The addon would have to use exclusively napi (https://nodejs.org/api/n-api.html), which is ABI stable, for deno to support it. This would have the added benefit of being guaranteed to work across Node major versions with a single addon, instead of having separate addons for each node major version.
The LoadLibraryExW
error occurs upon trying to load the addon because it has dependencies on dynamic libraries that are not present.
Would it be possible for Deno to support those APIs? Then addons could have a build for Deno, without rewriting it to be ABI stable, as an option.
No, they rely on the internals of Node.js. They can break at any time, even in Node.js, whenever Node.js changes anything about it's internals.
Version: deno 2.0.0-rc.5+8cdb309 (canary, release, x86_64-pc-windows-msvc) v8 12.9.202.13-rusty typescript 5.6.2 npm:edge-js@22.7.0
In Deno's REPL:
I tried this with deno v1.46.3, v2.0.0-rc.5 (rc), and 2.0.0-rc.5+8cdb309 (canary). I have
"nodeModulesDir": "auto"
in my deno.json file.I have seen a few issues and some merged PRs that are related to "LoadLibraryExW failed". Does it look like I'm missing something or is there a limitation in Deno, or maybe there is something that Edge.js can do to add Deno support?