LouieMartin
LouieMartin
DTDrizzle Team
Created by LouieMartin on 10/26/2023 in #help
HRANA_WEBSOCKET_ERROR: Unexpected server response: 404
I'm using ESNext for the target.
6 replies
DTDrizzle Team
Created by LouieMartin on 10/26/2023 in #help
HRANA_WEBSOCKET_ERROR: Unexpected server response: 404
I just added bun-types to ./tsconfig.json
6 replies
DTDrizzle Team
Created by LouieMartin on 10/26/2023 in #help
HRANA_WEBSOCKET_ERROR: Unexpected server response: 404
No description
6 replies
DTDrizzle Team
Created by LouieMartin on 10/26/2023 in #help
HRANA_WEBSOCKET_ERROR: Unexpected server response: 404
I'm using WSL with Ubuntu and Bun with Create-Next-App
6 replies
DTDrizzle Team
Created by LouieMartin on 10/26/2023 in #help
HRANA_WEBSOCKET_ERROR: Unexpected server response: 404
// ./src/db/schema.ts
import type { AdapterAccount } from "@auth/core/adapters";
import {
integer,
primaryKey,
sqliteTable,
text,
} from "drizzle-orm/sqlite-core";

export const users = sqliteTable("user", {
id: text("id").notNull().primaryKey(),
name: text("name"),
email: text("email").notNull(),
emailVerified: integer("emailVerified", { mode: "timestamp_ms" }),
image: text("image"),
});

export const accounts = sqliteTable(
"account",
{
userId: text("userId")
.notNull()
.references(() => users.id, { onDelete: "cascade" }),
type: text("type").$type<AdapterAccount["type"]>().notNull(),
provider: text("provider").notNull(),
providerAccountId: text("providerAccountId").notNull(),
refresh_token: text("refresh_token"),
access_token: text("access_token"),
expires_at: integer("expires_at"),
token_type: text("token_type"),
scope: text("scope"),
id_token: text("id_token"),
session_state: text("session_state"),
},
(account) => ({
compoundKey: primaryKey(account.provider, account.providerAccountId),
}),
);

export const sessions = sqliteTable("session", {
sessionToken: text("sessionToken").notNull().primaryKey(),
userId: text("userId")
.notNull()
.references(() => users.id, { onDelete: "cascade" }),
expires: integer("expires", { mode: "timestamp_ms" }).notNull(),
});

export const verificationTokens = sqliteTable(
"verificationToken",
{
identifier: text("identifier").notNull(),
token: text("token").notNull(),
expires: integer("expires", { mode: "timestamp_ms" }).notNull(),
},
(vt) => ({
compoundKey: primaryKey(vt.identifier, vt.token),
}),
);
// ./src/db/schema.ts
import type { AdapterAccount } from "@auth/core/adapters";
import {
integer,
primaryKey,
sqliteTable,
text,
} from "drizzle-orm/sqlite-core";

export const users = sqliteTable("user", {
id: text("id").notNull().primaryKey(),
name: text("name"),
email: text("email").notNull(),
emailVerified: integer("emailVerified", { mode: "timestamp_ms" }),
image: text("image"),
});

export const accounts = sqliteTable(
"account",
{
userId: text("userId")
.notNull()
.references(() => users.id, { onDelete: "cascade" }),
type: text("type").$type<AdapterAccount["type"]>().notNull(),
provider: text("provider").notNull(),
providerAccountId: text("providerAccountId").notNull(),
refresh_token: text("refresh_token"),
access_token: text("access_token"),
expires_at: integer("expires_at"),
token_type: text("token_type"),
scope: text("scope"),
id_token: text("id_token"),
session_state: text("session_state"),
},
(account) => ({
compoundKey: primaryKey(account.provider, account.providerAccountId),
}),
);

export const sessions = sqliteTable("session", {
sessionToken: text("sessionToken").notNull().primaryKey(),
userId: text("userId")
.notNull()
.references(() => users.id, { onDelete: "cascade" }),
expires: integer("expires", { mode: "timestamp_ms" }).notNull(),
});

export const verificationTokens = sqliteTable(
"verificationToken",
{
identifier: text("identifier").notNull(),
token: text("token").notNull(),
expires: integer("expires", { mode: "timestamp_ms" }).notNull(),
},
(vt) => ({
compoundKey: primaryKey(vt.identifier, vt.token),
}),
);
6 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
No description
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
if anybody wants to know the solution
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
basically just updated the @libsql/client package to 0.3.5-pre.2
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
I fixed the issue
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
so what can I do about this?
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
there are no sources on the internet either
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
That's literally all of it
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
./src/db/schema.ts
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";

export const todos = sqliteTable("todos", {
id: integer("id", { mode: "number" }).primaryKey({ autoIncrement: true }),
finished: integer("finished", { mode: "boolean" }),
content: text("content").notNull(),
});

export type Todo = typeof todos.$inferSelect;
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";

export const todos = sqliteTable("todos", {
id: integer("id", { mode: "number" }).primaryKey({ autoIncrement: true }),
finished: integer("finished", { mode: "boolean" }),
content: text("content").notNull(),
});

export type Todo = typeof todos.$inferSelect;
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
./src/db/index.ts
import { createClient } from "@libsql/client";
import { drizzle } from "drizzle-orm/libsql";
import * as schema from "./schema";

const client = createClient({
url: process.env.DATABASE_URL!,
authToken: process.env.DATABASE_AUTH_TOKEN,
});

export const db = drizzle(client, { schema, logger: true });
import { createClient } from "@libsql/client";
import { drizzle } from "drizzle-orm/libsql";
import * as schema from "./schema";

const client = createClient({
url: process.env.DATABASE_URL!,
authToken: process.env.DATABASE_AUTH_TOKEN,
});

export const db = drizzle(client, { schema, logger: true });
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
./src/index.tsx
import { html } from "@elysiajs/html";
import { Elysia } from "elysia";
import { BaseHtml } from "./components/BaseHtml";
// import { db } from './db';
// import { todos } from './db/schema';

const app = new Elysia()
.use(html())
.get("/", ({ html }) =>
html(
<BaseHtml>
<body>
<div class="justify-center items-center h-full flex">
<p>Hello, world!</p>
</div>
</body>
</BaseHtml>,
),
)
// .get("/todos", async () => await db.select().from(todos).all())
.get("/styles.css", () => Bun.file("./tailwind-gen/styles.css"))
.listen(3000);

console.log(
`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`,
);
import { html } from "@elysiajs/html";
import { Elysia } from "elysia";
import { BaseHtml } from "./components/BaseHtml";
// import { db } from './db';
// import { todos } from './db/schema';

const app = new Elysia()
.use(html())
.get("/", ({ html }) =>
html(
<BaseHtml>
<body>
<div class="justify-center items-center h-full flex">
<p>Hello, world!</p>
</div>
</body>
</BaseHtml>,
),
)
// .get("/todos", async () => await db.select().from(todos).all())
.get("/styles.css", () => Bun.file("./tailwind-gen/styles.css"))
.listen(3000);

console.log(
`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`,
);
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
nothing changes if i use export LD_LIBRARY_PATH=""
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
maybe it's because I'm on wsl
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
I'm also using WSL2
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
on windows 11
46 replies
DTDrizzle Team
Created by LouieMartin on 9/9/2023 in #help
error: Cannot find module "@libsql/linux-x64-musl" from "~/todion/node_modules/libsql/index.js"
with WSL2
46 replies