-
Notifications
You must be signed in to change notification settings - Fork 8
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
Publish types for npm package. #9
Comments
Bdw, I tried starting the application & I got this error:
Do I need to install https://www.npmjs.com/package/sqlite-ulid-windows-x64 too? Windows instructions unclear. |
Okay, I think installing But when I run my application, I get this error:
Idk what to do now? |
I tried Here's my code: import { drizzle } from 'drizzle-orm/better-sqlite3'
import sqlite from 'better-sqlite3'
import * as sqlite_ulid from 'sqlite-ulid'
const client = sqlite(process.env.DATABASE_PATH)
client.pragma('journal_mode = WAL') // see https://github.com/WiseLibs/better-sqlite3/blob/master/docs/performance.md
client.loadExtension(sqlite_ulid.getLoadablePath())
export const db = drizzle(client) I'm using it for this project on Lmk if there are any solutions? I can't find anything on this online. |
Alright, I'll use import { ulid } from "ulid";
export const users = sqliteTable("users", {
id: text("id")
.primaryKey()
.$defaultFn(() => ulid()),
}); Courtesy of https://www.answeroverflow.com/m/1191758386711253133 |
I'm having the same issue in |
I asked ChatGPT for types & it gave this:
Can you publish this? I'll use a
global.d.ts
in the meantime :)And thanks for the project. Does it add
ulid
toid
automatically?The text was updated successfully, but these errors were encountered: