node-sqlite3 icon indicating copy to clipboard operation
node-sqlite3 copied to clipboard

fails to run in pkg-generated program

Open pedefe opened this issue 1 year ago • 0 comments

Issue Summary

On arm64 proc. computer:

When running program, fails when loads sqlite3.

Relevant logs or output

include sqlite3... pkg/prelude/bootstrap.js:1876 throw error; ^

Error: Cannot find module '/snapshot/NexoManager/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-arm64/node_sqlite3.node' Require stack:

  • /snapshot/NexoManager/node_modules/sqlite3/lib/sqlite3-binding.js
  • /snapshot/NexoManager/node_modules/sqlite3/lib/sqlite3.js
  • /snapshot/NexoManager/index.js
  1. If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath. at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15) at Function._resolveFilename (pkg/prelude/bootstrap.js:1955:46) at Function.Module._load (internal/modules/cjs/loader.js:667:27) at Module.require (internal/modules/cjs/loader.js:887:19) at Module.require (pkg/prelude/bootstrap.js:1855:31) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/snapshot/NexoManager/node_modules/sqlite3/lib/sqlite3-binding.js:4:17) at Module._compile (pkg/prelude/bootstrap.js:1930:22) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) { code: 'MODULE_NOT_FOUND', requireStack: [ '/snapshot/NexoManager/node_modules/sqlite3/lib/sqlite3-binding.js', '/snapshot/NexoManager/node_modules/sqlite3/lib/sqlite3.js', '/snapshot/NexoManager/index.js' ], pkg: true }

Version

[email protected]

Node.js Version

root@bionic-newport:/var/prog# node -v : v12.21.0

How did you install the library?

npm install node-pre-gyp --force --save --unsafe-perm npm install sqlite3 --force --save --unsafe-perm

pedefe avatar Nov 21 '22 15:11 pedefe