-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:bug LoadLibraryExW Error when trying to compile executable using Deno and Windows #143
Comments
Using DuckDB with Node necessarily depends on native modules; DuckDB is native code. I don't know enough about Deno's The error message you included appears to be for the "classic" Node bindings for DuckDB, not for Node Neo. Could you include the error message you see for |
Hello @jraymakers . I created a |
I get a 404 when I try to follow that link. Please include the actual error message for Node Neo. It's not easy for me to set up a development environment on Windows. |
I was able to access the gist and try it out on a Windows machine. The compile step works:
But running the compiled app.exe hits the error:
Node Neo depends on DuckDB as a dynamic library. There is a DLL in node-bindings-win32-x64, duckdb.dll, that is loaded dynamically by native code. According to the compile output, this directory was included in the exe, but it seems the native code is unable to load it at runtime. I don't know enough about Deno's compile functionality to troubleshoot further. My guess is something about the way it makes files that are embedded in the exe accessible to code doesn't work for native modules. If that's true, there's not much I can do to help. Maybe there's some configuration of Deno that would work. I think you'll need to ask for further assistance on Deno forums. |
Thanks for helping Jeff. Will reach out to the Deno community.
**** Ivan Quintero
…On Sun, Feb 9, 2025 at 2:22 AM Jeff Raymakers ***@***.***> wrote:
I was able to access the gist and try it out on a Windows machine.
The compile step works:
PS C:\Users\jephl\github\deno_compile_gist> deno compile --allow-all --output app .\index.js
Check file:///C:/Users/jephl/github/deno_compile_gist/index.js
Compile file:///C:/Users/jephl/github/deno_compile_gist/index.js to app.exe
Embedded Files
app.exe
├─┬ .deno_compile_node_modules (28.73MB - 28.72MB unique)
│ └─┬ localhost (28.73MB - 28.72MB unique)
│ └─┬ @duckdb (28.73MB - 28.72MB unique)
│ ├── node-api/* (362.69KB - 361.48KB unique)
│ ├── node-bindings/* (58.98KB - 57.9KB unique)
│ └── node-bindings-win32-x64/* (28.31MB)
├── db.js (282B)
└── index.js (251B)
Size: 28.72MB
But running the compiled app.exe hits the error:
PS C:\Users\jephl\github\deno_compile_gist> .\app.exe
error: Uncaught (in promise) TypeError: LoadLibraryExW failed
at Object.Module._extensions..node (node:module:799:20)
at Module.load (node:module:660:32)
at Function.Module._load (node:module:532:12)
at Module.require (node:module:679:19)
at require (node:module:810:16)
at getNativeNodeBinding ***@***.***/node-bindings/1.2.0-alpha.13/duckdb.js:17:20)
at Object.<anonymous> ***@***.***/node-bindings/1.2.0-alpha.13/duckdb.js:24:18)
at Object.<anonymous> ***@***.***/node-bindings/1.2.0-alpha.13/duckdb.js:26:4)
at Module._compile (node:module:743:34)
at loadMaybeCjs (node:module:768:10)
Node Neo depends on DuckDB as a dynamic library. There is a DLL in
node-bindings-win32-x64, duckdb.dll, that is loaded dynamically by native
code. According to the compile output, this directory was included in the
exe, but it seems the native code is unable to load it at runtime.
I don't know enough about Deno's compile functionality to troubleshoot
further. My guess is something about the way it makes files that are
embedded in the exe accessible to code doesn't work for native modules. If
that's true, there's not much I can do to help. Maybe there's some
configuration of Deno that would work. I think you'll need to ask for
further assistance on Deno forums.
—
Reply to this email directly, view it on GitHub
<#143 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJWMSRAZGOFBGFLKTOUECL2O23YFAVCNFSM6AAAAABWWUT2L2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBWGAZTCOBUG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
If you build any application and try to bundle it as an
.exe
app in Windows you get the following error.Steps to reproduce
1. Create a simple script that connects to a Duck DB database. Similar to the one below
2. Compile into an executable
Additional info
The issue seem to be related to the library's use of native modules (found in the node-bindings direcdory).
The text was updated successfully, but these errors were encountered: