error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"

error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
No description
11 Replies
LouieMartin
LouieMartin14mo ago
Also, maybe this is useful. There was an error earlier before this that required me to install better-sqlite3 for some reason. also I just updated to Bun v1.0.0 and it's still not working
Luxaritas
Luxaritas14mo ago
This is ultimately a Libsql issue, and likely a compatibility issue with your environment libsql doesn’t appear to publish binaries compiled for musl libc, only gnu libc I’m guessing you’re trying to run on alpine?
LouieMartin
LouieMartin14mo ago
no, im trying to run on elysia and turso
Luxaritas
Luxaritas14mo ago
Haven’t heard of Elysia, but I’m referring to your operating system/Linux distribution That you’re running that command on
rampantfirefly
rampantfirefly14mo ago
Having the same issue. On Ubuntu 22.04 (WSL). I believe OP is trying to learn the BETH stack https://www.youtube.com/watch?v=cpzowDDJj24 as I'm doing the same. There appears to be a few instances where people like us cannot successfully run any drizzle commands to connect to Turso DB. I get 404 errors when trying to run bun x drizzle-kit push:sqlite, and get this same missing module error whilst trying to use drizzle-kit studio.
rampantfirefly
rampantfirefly14mo ago
To be transparent, I'm on Bun v0.8.1. It seems like Bun v1.0.0 breaks this stack completely, and the main issue seems to be with Turso. There's a thread on their Discord.
LouieMartin
LouieMartin14mo ago
Ubuntu LTS
Luxaritas
Luxaritas14mo ago
Aaaaand found it
Luxaritas
Luxaritas14mo ago
There’s a node API not currently implemented in Bun which is causing libsql to fall back to thinking your system is using musl instead of glibc. There’s apparently a PR to bun for implementing it https://github.com/oven-sh/bun/pull/3326
GitHub
Implement process.report by LiminalHelix · Pull Request #3326 · o...
Primarily implements process.report.getReport() and process.report.writeReport() Not all fields of the returned report object are implemented, many are stubbed, some temporarily, others may be fore...
Luxaritas
Luxaritas14mo ago
This is definitely not a drizzle issue, is sort of an issue in libsql and @neon-rs/load, but ultimately an issue with bun
LouieMartin
LouieMartin14mo ago
[0] 1 | (function (id){"use strict";var cached=@requireMap.@get(id);const last5=id.substring(id.length-5);if(cached)return cached.exports;if(last5===".json"){var fs=globalThis[Symbol.for("_fs")]\||[email protected](),exports=JSON.parse(fs.readFileSync(id,"utf8"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else if(last5===".node"){const module=@createCommonJSModule(id,{},!0);return process.dlopen(module,id),@requireMap.@set(id,module),module.exports}else if(last5===".toml"){var fs=globalThis[Symbol.for("_fs")]||[email protected](),[email protected](fs.readFileSync(id,"utf8"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else{var exports=@requireESM(id);const cachedModule=@requireMap.@get(id);if(cachedModule)return cachedModule.exports;return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}})
[0] ^
[0] TypeError: /lib/x86_64-linux-gnu/libc.so: invalid ELF header
[0] at internalRequire (:1:20)
[0] at /home/louie/beth-stack/node_modules/libsql/index.js:26:23
[0] at globalThis (/home/louie/beth-stack/node_modules/libsql/index.js:313:29)
[0] 1 | (function (id){"use strict";var cached=@requireMap.@get(id);const last5=id.substring(id.length-5);if(cached)return cached.exports;if(last5===".json"){var fs=globalThis[Symbol.for("_fs")]\||[email protected](),exports=JSON.parse(fs.readFileSync(id,"utf8"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else if(last5===".node"){const module=@createCommonJSModule(id,{},!0);return process.dlopen(module,id),@requireMap.@set(id,module),module.exports}else if(last5===".toml"){var fs=globalThis[Symbol.for("_fs")]||[email protected](),[email protected](fs.readFileSync(id,"utf8"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else{var exports=@requireESM(id);const cachedModule=@requireMap.@get(id);if(cachedModule)return cachedModule.exports;return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}})
[0] ^
[0] TypeError: /lib/x86_64-linux-gnu/libc.so: invalid ELF header
[0] at internalRequire (:1:20)
[0] at /home/louie/beth-stack/node_modules/libsql/index.js:26:23
[0] at globalThis (/home/louie/beth-stack/node_modules/libsql/index.js:313:29)
Aaaaaaand another error lol I have never seen this error in my entire life
Want results from more Discord servers?
Add your server