You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, we are not able to execute this library as node is having issues with the lz4 dependency of this package. Can you please assist on how to use databricks-sql-nodejs in a standard Linux or Mac + NodeJS environment.
{...}/node_modules/@databricks/sql/dist/utils/lz4.js:10
throw err;
^
Error: {...}/node_modules/lz4/build/Release/xxhash.node: invalid ELF header
at Module._extensions..node (node:internal/modules/cjs/loader:1460:18)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/home/dejhjs3e/projects/databricks-node/node_modules/lz4/lib/utils.js:4:11)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12) {
code: 'ERR_DLOPEN_FAILED'
}
versions:
@databricks/sql: 1.10.0
npm: 10.8.2
node: v18.20.8, v20.16.0, v22.6.0 (tested all of them)
Hi, I'm experiencing the same issue when using @databricks/sql (version 1.10.0)
When I run the project using Node v18.20.8, I get the following error:
/usr/src/app/node_modules/@databricks/sql/dist/utils/lz4.js:10
throw err;
^
Error: {...}/node_modules/lz4/build/Release/xxhash.node: invalid ELF header
at Module._extensions..node (node:internal/modules/cjs/loader:1460:18)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/usr/src/app/node_modules/lz4/lib/utils.js:4:11)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12) {
code: 'ERR_DLOPEN_FAILED'
}
I've also tested with other Node versions with the same result. Any updates or workarounds would be greatly appreciated. Thanks!
LZ4 native module failed to load: Architecture or version mismatch Error: {...}/node_modules/.pnpm/lz4@0.6.5/node_modules/lz4/build/Release/xxhash.node: invalid ELF header
at Object..node (node:internal/modules/cjs/loader:1920:18)
at Module.load (node:internal/modules/cjs/loader:1481:32)
at Module._load (node:internal/modules/cjs/loader:1300:12)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
at Module.require (node:internal/modules/cjs/loader:1504:12)
at require (node:internal/modules/helpers:152:16)
at Object.<anonymous> ({...}/node_modules/.pnpm/lz4@0.6.5/node_modules/lz4/lib/utils.js:4:11)
at Module._compile (node:internal/modules/cjs/loader:1761:14)
at Object.transformer ({...}/node_modules/.pnpm/tsx@4.20.6/node_modules/tsx/dist/register-D46fvsV_.cjs:3:1104) {
code: 'ERR_DLOPEN_FAILED'
}
What's worse in my opinion is that you are relying on an archived project that hasn't had an update in the past 2 years.
It is no longer crashing the program, but throws thrash into the logs - and the PR did not do anything to resolve the underlying issue.
LZ4 native module failed to load: Architecture or version mismatch Error: {...}/node_modules/.pnpm/lz4@0.6.5/node_modules/lz4/build/Release/xxhash.node: invalid ELF header
at Object..node (node:internal/modules/cjs/loader:1920:18)
at Module.load (node:internal/modules/cjs/loader:1481:32)
at Module._load (node:internal/modules/cjs/loader:1300:12)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
at Module.require (node:internal/modules/cjs/loader:1504:12)
at require (node:internal/modules/helpers:152:16)
at Object.<anonymous> ({...}/node_modules/.pnpm/lz4@0.6.5/node_modules/lz4/lib/utils.js:4:11)
at Module._compile (node:internal/modules/cjs/loader:1761:14)
at Object.transformer ({...}/node_modules/.pnpm/tsx@4.20.6/node_modules/tsx/dist/register-D46fvsV_.cjs:3:1104) {
code: 'ERR_DLOPEN_FAILED'
}
What's worse in my opinion is that you are relying on an archived project that hasn't had an update in the past 2 years.
It is no longer crashing the program, but throws thrash into the logs - and the PR did not do anything to resolve the underlying issue.
Activity
vadimgaidai commentedon Apr 3, 2025
Hi, I'm experiencing the same issue when using
@databricks/sql(version 1.10.0)When I run the project using
Node v18.20.8, I get the following error:I've also tested with other Node versions with the same result. Any updates or workarounds would be greatly appreciated. Thanks!
jansepke commentedon Apr 3, 2025
One possible workaround is to change the npm config
then the problematic lz4 dependency will never get installed but also all other optional dependencies of your project
zagazoom commentedon May 6, 2025
+1 on this, we are using Auth0 Actions and it is not possible for us to control the
npm config. So we are forced to use an older versionsamikshya-db commentedon Jul 21, 2025
Closing as this is merged and released on May 19, 2025. Feel free to open if there is any issue related to this.
JenspederM commentedon Nov 25, 2025
This is still an issue in version 1.12.0
I get the following error:
What's worse in my opinion is that you are relying on an archived project that hasn't had an update in the past 2 years.
It is no longer crashing the program, but throws thrash into the logs - and the PR did not do anything to resolve the underlying issue.
If this SDK is truly dependent on lz4, the least you could do would be to switch to a maintained version, e.g., https://www.npmjs.com/package/lz4-napi
robertcoopercode commentedon Dec 3, 2025
FYI, I created a separate issue for this: #317
samikshya-db commentedon Dec 3, 2025
@JenspederM thanks for raising the concern. We will be picking this up.
shivam-clary commentedon Dec 30, 2025
Is the version with this PR merged been released yet? If not, when are we planning to do this? The PR was merged last month but the last update on npm was 3 months ago
https://www.npmjs.com/package/@databricks/sql?activeTab=readme