Skip to content
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

node-sqlite3 package not supported for Cross platform #1791

Open
krishnashravtek opened this issue May 22, 2024 · 0 comments
Open

node-sqlite3 package not supported for Cross platform #1791

krishnashravtek opened this issue May 22, 2024 · 0 comments

Comments

@krishnashravtek
Copy link

Issue Summary

I'm using the node:sqlite3 package in a cross-platform application. After compiling the application on a Linux machine for a winx64 platform, the executable file throws an error on the Windows machine.

When installing the package, I only get the binary for the platform I install. So the target platform couldn't launch the binary and throws node_sqlite3.node is not a valid Win32 application.

Yeah, I can remove the node_modules directory, reinstall the dependency, and compile on the Win32 itself.

THat should work.

But I can't repeat the compiling for every platform with a different arch.

Is there a way for me to install dependencies on my Linux computer and compile for a different platform?

Relevant logs or output

pkg/prelude/bootstrap.js:1872
throw error;
^

Error: C:\Users\Dell\AppData\Local\Temp\pkg\c9bd0419f77efb3b5d3a691fda04e265f740ad8dc195f0b56003cdeac92e9a34\lin-sqlite3\build\Release\node_sqlite3.node is not a valid Win32 application.
C:\Users\Dell\AppData\Local\Temp\pkg\c9bd0419f77efb3b5d3a691fda04e265f740ad8dc195f0b56003cdeac92e9a34\lin-sqlite3\build\Release\node_sqlite3.node
at process.dlopen (pkg/prelude/bootstrap.js:2251:28)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Module.require (pkg/prelude/bootstrap.js:1851:31)
at require (node:internal/modules/cjs/helpers:102:18)
at bindings (C:\snapshot\hyzignServer\node_modules\bindings\bindings.js:112:48)
at Object. (C:\snapshot\hyzignServer\node_modules\lin-sqlite3\lib\sqlite3-binding.js:1:99)
at Module._compile (pkg/prelude/bootstrap.js:1926:22) {
code: 'ERR_DLOPEN_FAILED'
}

Version

V5.1.7

Node.js Version

v16.20.2

How did you install the library?

with npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant