I started getting this error from nowhere and I googled a lot but got no help
This was working fine but maybe after I setup github workflows Codeql-analysis.yml
. or maybe after i updated packages - started getting this error.
- my app code is clean no issues.
- I'm sure my app code not made this error.
"sqlite": "^4.0.25",
"sqlite3": "^5.0.2"
sqlite3 5.0.3 is latest version
Error:
node:internal/modules/cjs/loader:1183
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/dreamy/YouTube/Silenzio_Bruno/node_modules/sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/dreamy/YouTube/Silenzio_Bruno/node_modules/sqlite3/lib/sqlite3-binding.js:4:15)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
code: 'ERR_DLOPEN_FAILED'
}
Node.js v17.9.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
- versions
npm: '8.7.0'
node: 'v17.9.0'
This what i tried till now as google solutions
- I removed .github/workflows folder.
- i created new folder copied all code files tried to run again.
- I tried removing
node_modulues
folder andyarn.lock
file and tried installing again - Tried to clean cache
yarn
andgit
withnpm cache clean sqlite3
,yarn cache clean
,git rm -r --cached .
- tried
npm rebuild bcrypt --build-from-source
- tried updating all packages
CodePudding user response:
This happened to me yesterday as well. After I updated my Debian system, if found Debian upgraded Bullseye to include GLIBC 2.31:
https://packages.debian.org/bullseye/libc6-amd64
The SQLITE3 module page explains the module including statically linked, pre-built binaries that require specific versions of GLIBC:
https://www.npmjs.com/package/sqlite3 (Section titled Prebuilt binaries)
Until the module gets updated itself, the same page describes compiling from source using the host system's sqlite3 install.
For Debian Bullseye I did the following:
apt-get install sqlite3 libsqlite3-dev
npm install --build-from-source --sqlite=/usr/bin sqlite3
The module worked after that. I don't know much about your environment and how easy this would be to implement for you. I suspect if you check the GLIBC version on the host system, you also recently had a change.