Closed quantuminformation closed 6 months ago
i got same error with bun so closing
value.getTime is not a function. (In 'value.getTime()', 'value.getTime' is undefined) at mapToDriverValue (/Users/nikos/WebstormProjects/drizzle-sqlite-recurring-events/node_modules/drizzle-orm/sqlite-core/columns/integer.js:71:17) at /Users/nikos/WebstormProjects/drizzle-sqlite-recurring-events/node_modules/drizzle-orm/sql/sql.js:119:58 at map (:1:20) at buildQueryFromSourceParams (/Users/nikos/WebstormProjects/drizzle-sqlite-recurring-events/node_modules/drizzle-orm/sql/sql.js:72:24) at map (:1:20) at buildQueryFromSourceParams (/Users/nikos/WebstormProjects/drizzle-sqlite-recurring-events/node_modules/drizzle-orm/sql/sql.js:72:24) at map (:1:20) at buildQueryFromSourceParams (/Users/nikos/WebstormProjects/drizzle-sqlite-recurring-events/node_modules/drizzle-orm/sql/sql.js:72:24) at /Users/nikos/WebstormProjects/drizzle-sqlite-recurring-events/node_modules/drizzle-orm/sql/sql.js:52:20 at prepare (/Users/nikos/WebstormProjects/drizzle-sqlite-recurring-events/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:123:6) error: script "db:seed" exited with code 1 (SIGHUP) ➜ drizzle-sqlite-recurring-events git:(main) ✗
why is this closed? what is the fix?
This is an issue with Drizzle--not with this library.
I'd suggest extracting the inline new Date(...).getTime()
into a constant before the .insert
call and seeing what happens, as the value.getTime()
error is pretty nonsensical.
Okay thank you. My drizzle queries work fine but I'm using Lucia Auth and I get the error when Lucia is trying to create a new session
Thanks for this cool project
this code in this basic repo
https://github.com/quantuminformation/drizzle-sqlite-recurring-events
when running
pnpm run db:seed
gives erroryou can see that getTime works when debugging in vscode so I don't know where this error originates