Copy link to clipboard
Copied
Is CEP supposed to load node.js addon DLLs (*.node, like Samples/bson.node at master Ā· Adobe-CEP/Samples Ā· GitHub)? If it is, are there any related gotchas?
Copy link to clipboard
Copied
Hi Alexander,
All third-party node JavaScript modules are supported. The root search path of third-party modules is the directory which contains your html file. For example, when you do require in file:///your_extension/index.html, CEP will lookup modules under file:///your_extension/node_modules, this rule is exactly the same with upstream node.
Node.js native modules are not directly supported since CEP is using a different V8 version from the official node.
Kind regards,
Lea
Copy link to clipboard
Copied
> Node.js native modules are not directly supported
Thanks for the reply. Does this mean that Node.js native modules may still be supported indirectly? Otherwise, how should the said example work?
Copy link to clipboard
Copied
One indirect is to use wasm instead of the node library. For example I wanted to use sqlite but instead ended up using sqlite wasm and hosted it in an invisible extension.
-Manan
Copy link to clipboard
Copied
Note this sample is now at: https://github.com/Adobe-CEP/CEP-Resources/tree/master/CEP_11.x/Samples/CEP_HTML_Test_Extension-10.0...