oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.46k stars 2.71k forks source link

libc.so: cannot open shared object file: No such file or directory #5130

Closed phenomenal-hardy closed 11 months ago

phenomenal-hardy commented 1 year ago

What version of Bun is running?

1.0.1+31aec4ebe325982fc0ef27498984b0ad9969162b

What platform is your computer?

Linux 5.15.90.1-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

when trying to run elysia js with libsql adapter (lucia auth), i get the following error ( im using WSL)

libc.so: cannot open shared object file: No such file or directory
import { lucia } from "lucia";
import { elysia } from "lucia/middleware";
import { libsql } from "@lucia-auth/adapter-sqlite";
import { db } from "./db/database";

export const auth = lucia({
    env: 'DEV',
    middleware: elysia(),
    sessionCookie: {
        expires: false
    },
    adapter: libsql(db, {
        user: "user",
        key: "user_key",
        session: "user_session"
    })

});

export type Auth = typeof auth;
// db/database.ts
import { createClient } from "@libsql/client";

export const db = createClient({
    url: Bun.env.DATABASE_URL as string,
    authToken: Bun.env.TURSO_AUTH_TOKEN
});

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

devgar commented 12 months ago

Sometimes I can evade errors like this by running this command

cp node_modules/@libsql/linux-x64-gnu/index.node node_modules/@libsql/linux-x64-musl/index.node

But new ones are raised after

Electroid commented 11 months ago

This issue is caused by #4959, which we will fix.

Jarred-Sumner commented 9 months ago

This was not fixed by #4959, however you can add @libsql/linux-x64-gnu to "trustedDependencies" in package.json and it should work as expected.