We would like to use Aspose.Cells for Node.js via Java in an Electron application on Windows.
However, Aspose.Cells for Node.js via Java depends internally on node-java, which is built on NAN.
NAN relies directly on V8 C++ APIs, which are not ABI-stable and change frequently across Electron releases.
As a result, node-java encounters linker errors when built against Electron on Windows.
The Electron team explicitly recommends using N-API (Node-API) instead of NAN for native addons, and has stated that resolving NAN-based ABI and linker issues in Electron is difficult and not planned:
Therefore, we request that Aspose.Cells for Node.js via Java migrate its internal Java bridge from node-java (NAN-based) to an N-API-based solution, such as java-bridge. https://www.npmjs.com/package/java-bridge
By adopting N-API, Aspose.Cells for Node.js via Java would become usable and stable in Electron on Windows, in line with Electron and Node.js best practices.
Your request has been noted. Below is a concise summary of the points you raised, each supported by the information you provided:
Dependency on node‑java (NAN‑based). Aspose.Cells for Node.js via Java uses the node‑java bridge, which is built on the NAN framework.【1】
NAN’s ABI instability with Electron. NAN directly accesses V8 C++ APIs that are not ABI‑stable; they change frequently across Electron releases, causing linker errors when node‑java is compiled for Electron on Windows.【1】
Electron’s recommendation to use N‑API. The Electron team advises using N‑API (Node‑API) instead of NAN for native addons and states that fixing NAN‑based ABI/linker issues in Electron is difficult and not planned.【1】
Feature request: migrate to an N‑API‑based bridge (e.g., java‑bridge). You propose replacing the current NAN‑based node‑java bridge with an N‑API solution such as java‑bridge to achieve stable usage of Aspose.Cells for Node.js via Java in Electron applications on Windows.【1】
If you have additional details (e.g., specific Electron versions, build environment, or any workarounds you have tried), please share them here so we can better assess the impact.
We require thorough evaluation of your requested feature. We will check the feasibility if we could migrate Aspose.Cells for Node.js via Java from node-java (NAN) to N-API. We have opened the following new investigation ticket(s) in our internal issue tracking system.
Issue ID(s): CELLSNODEJSJAVA-86
Once we have an update on it, we will you know here.
By the way, if possible, could you please try Aspose.Cells for Node.js via C++ for your scenario/case as we generally recommend users who want high performance and stable compatibility in different environments?
We kindly suggest trying Aspose.Cells for Node.js via C++ as an alternative for Electron integration. We have prepared a working sample project for your reference.
We understand that Aspose.Cells for Node.js via C++ can work with Electron, and we appreciate you pointing that out.
However, there are several practical reasons why this option is difficult for us.
First, Aspose.Cells for Node.js via Java and Aspose.Cells for Node.js via C++ require separate licenses.
Maintaining licenses for both products is financially challenging for us, especially when we aim to use Aspose.Cells consistently across our environments, including Electron.
Second, our existing codebase is already tightly integrated with Aspose.Cells for Node.js via Java.
Migrating to Aspose.Cells for Node.js via C++ would require refactoring and revalidation, which represents somewhat engineering cost and risk.
In addition, we currently use Aspose.Cells for Node.js via Java in non-Electron environments as well, such as inside Docker containers, and both our Docker-based applications and our Electron application share the same codebase.
Because of this, switching to Aspose.Cells for Node.js via C++ only when integrating with Electron would be difficult.
Maintaining different Aspose.Cells integrations depending on the runtime environment would significantly increase complexity and maintenance overhead.
Finally, as long as the integration continues to use the legacy NAN/V8 APIs directly, it will remain susceptible to the same class of ABI and linker issues that we encountered in the Electron environment.
The Node.js documentation explicitly states that Node-API (N-API) provides a stable ABI independent of the underlying JavaScript engine (such as V8), and recommends using Node-API for native addons instead of directly depending on V8 or NAN in order to remain ABI-stable across releases.
This ABI stability is a core reason why Node-API exists and why it is recommended for native addon development in Node.js.
For these reasons, while we acknowledge that the C++ variant is an option, we would strongly prefer to see Aspose.Cells for Node.js via Java adopt an N-API–based integration (instead of node-java), so that it can be used reliably in Electron on Windows.
Thank you for your understanding and consideration.
@coopelkatz
Aspose.Cells for Node.js via C++ is implemented using the node-addon-api, so it doesn’t have ABI stability issues. I will attempt to migrate Aspose.Cells for Node.js via Java from node-java (NAN) to N-API, which may take a considerable amount of time. Thanks.