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

Cannot find module '@databend-driver/lib-linux-x64-musl' when lib-linux-x64-gnu is present #419

Closed
fatflowers opened this issue May 9, 2024 · 4 comments · Fixed by #421

Comments

@fatflowers
Copy link

fatflowers commented May 9, 2024

I think isMul didn't works fine
https://github.com/datafuselabs/bendsql/blame/4a1654483cbdf7741d094185c8cc226db4c63177/bindings/nodejs/generated.js#L32

Description

I am experiencing an issue where Node.js cannot find the required module @databend-driver/lib-linux-x64-musl.

However, the directory @databend-driver/ contains lib-linux-x64-gnu instead.

This issue has arisen despite having the correct dependency listed in package.json.

Steps to Reproduce

Include databend-driver in package.json:

"dependencies": {
    "databend-driver": "^0.17.2"
}

Attempt to run the project.
Encounter error: ERROR Cannot find module '@databend-driver/lib-linux-x64-musl'.
Expected Behavior
The application should correctly locate and use the available lib-linux-x64-gnu library, or the documentation should specify if additional configuration is needed when the musl variant is not available.

Actual Behavior

Node.js throws an error saying it cannot find the @databend-driver/lib-linux-x64-musl module.

@fatflowers
Copy link
Author

and this is the output of process.report.getReport().header, no present of glibcVersionRuntime

{
reportVersion: 3,
event: 'JavaScript API',
trigger: 'GetReport',
filename: null,
dumpEventTime: '2024-05-09T04:18:22Z',
dumpEventTimeStamp: '1715228302512',
processId: 59,
threadId: 0,
cwd: '/app',
commandLine: [ 'node', 'getReportHeader.js' ],
nodejsVersion: 'v20.9.0',
wordSize: 64,
arch: 'x64',
platform: 'linux',
componentVersions: {
acorn: '8.10.0',
ada: '2.6.0',
ares: '1.19.1',
base64: '0.5.0',
brotli: '1.0.9',
cjs_module_lexer: '1.2.2',
cldr: '43.1',
icu: '73.2',
llhttp: '8.1.1',
modules: '115',
napi: '9',
nghttp2: '1.57.0',
nghttp3: '0.7.0',
ngtcp2: '0.8.1',
node: '20.9.0',
openssl: '3.0.10+quic',
simdutf: '3.2.17',
tz: '2023c',
undici: '5.26.3',
unicode: '15.0',
uv: '1.46.0',
uvwasi: '0.0.18',
v8: '11.3.244.8-node.16',
zlib: '1.2.13.1-motley'
},
release: {
name: 'node',
lts: 'Iron',
headersUrl: 'https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-headers.tar.gz',
sourceUrl: 'https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0.tar.gz'
},
osName: 'Linux',
osRelease: '5.10.215-203.850.amzn2.x86_64',
osVersion: '#1 SMP Tue Apr 23 20:32:19 UTC 2024',
osMachine: 'x86_64',
cpus: [
{
model: 'AMD EPYC 7571',
speed: 0,
user: 5915690,
nice: 220,
sys: 2366940,
idle: 6056590,
irq: 0
},
{
model: 'AMD EPYC 7571',
speed: 0,
user: 5880800,
nice: 190,
sys: 2403340,
idle: 6056780,
irq: 0
},
{
model: 'AMD EPYC 7571',
speed: 0,
user: 5925420,
nice: 160,
sys: 2341250,
idle: 6102590,
irq: 0
},
{
model: 'AMD EPYC 7571',
speed: 0,
user: 5956070,
nice: 130,
sys: 2340950,
idle: 6051130,
irq: 0
},
{
model: 'AMD EPYC 7571',
speed: 0,
user: 5944780,
nice: 200,
sys: 2345240,
idle: 6107300,
irq: 0
},
{
model: 'AMD EPYC 7571',
speed: 0,
user: 5894770,
nice: 210,
sys: 2404170,
idle: 6009230,
irq: 0
},
{
model: 'AMD EPYC 7571',
speed: 0,
user: 5928370,
nice: 170,
sys: 2392020,
idle: 6069830,
irq: 0
},
{
model: 'AMD EPYC 7571',
speed: 0,
user: 5864910,
nice: 240,
sys: 2399890,
idle: 5989810,
irq: 0
}
],
networkInterfaces: [
{
name: 'lo',
internal: true,
mac: '00:00:00:00:00:00',
address: '127.0.0.1',
netmask: '255.0.0.0',
family: 'IPv4'
},
{
name: 'eth0',
internal: false,
mac: '96:da:fb:c7:40:20',
address: '10.50.40.74',
netmask: '255.255.255.255',
family: 'IPv4'
},
{
name: 'lo',
internal: true,
mac: '00:00:00:00:00:00',
address: '::1',
netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
family: 'IPv6',
scopeid: 0
},
{
name: 'eth0',
internal: false,
mac: '96:da:fb:c7:40:20',
address: 'fe80::94da:fbff:fec7:4020',
netmask: 'ffff:ffff:ffff:ffff::',
family: 'IPv6',
scopeid: 3
}
],
host: 'pixai-server-api-prod-647f5d9fbf-7v7jx'
}

@everpcpc
Copy link
Member

everpcpc commented May 9, 2024

Hi, linux-x64-musl target is not supported yet, it's different from linux-x64-gnu.
Maybe we could add support for it.

@fatflowers
Copy link
Author

Hi, linux-x64-musl target is not supported yet, it's different from linux-x64-gnu. Maybe we could add support for it.

@everpcpc

Thanks for your time.
To clear my question.
My program is encountering the following error, how to fix it?

Cannot find module '@databend-driver/lib-linux-x64-musl'
Require stack:
- /app/node_modules/databend-driver/generated.js
- /app/node_modules/databend-driver/index.js
- /app/dist/src/util/databend.js
- /app/dist/scripts/20240507122029-news-push.js
Error: Cannot find module '@databend-driver/lib-linux-x64-musl'
Require stack:
- /app/node_modules/databend-driver/generated.js
- /app/node_modules/databend-driver/index.js
- /app/dist/src/util/databend.js
- /app/dist/scripts/20240507122029-news-push.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/app/node_modules/databend-driver/generated.js:193:31)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
"dependencies": {
    "databend-driver": "^0.17.2"
}

@everpcpc
Copy link
Member

You could try after #420 got released.

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

Successfully merging a pull request may close this issue.

2 participants