Error: undefined is not an object
Getting the following error:
Seems to be occuring at the following code in my app:
Any idea what's occuring here? Doesn't happen with any other database calls including similar calls with the same
84 | span?.setAttributes({
85 | "drizzle.query.name": query.name,
86 | "drizzle.query.text": query.text,
87 | "drizzle.query.params": JSON.stringify(params)
88 | });
89 | return client.query(query, params);
^
TypeError: undefined is not an object (evaluating 'client.query')
at C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\node-postgres\session.js:89:16
at C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\node-postgres\session.js:83:35
at C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\node-postgres\session.js:69:54
at execute (C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\node-postgres\session.js:68:17)
at then (C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\query-promise.js:21:17)84 | span?.setAttributes({
85 | "drizzle.query.name": query.name,
86 | "drizzle.query.text": query.text,
87 | "drizzle.query.params": JSON.stringify(params)
88 | });
89 | return client.query(query, params);
^
TypeError: undefined is not an object (evaluating 'client.query')
at C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\node-postgres\session.js:89:16
at C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\node-postgres\session.js:83:35
at C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\node-postgres\session.js:69:54
at execute (C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\node-postgres\session.js:68:17)
at then (C:\Users\ThatTonybo\Desktop\deepslate\api\node_modules\drizzle-orm\query-promise.js:21:17)Seems to be occuring at the following code in my app:
// const db = drizzle(process.env.DATABASE_URL as string);
const [account] = await db
.select({ id: accountsTable.id, passwordHash: accountsTable.passwordHash })
.from(accountsTable)
.where(eq(lower(accountsTable.email), email.toLowerCase()));// const db = drizzle(process.env.DATABASE_URL as string);
const [account] = await db
.select({ id: accountsTable.id, passwordHash: accountsTable.passwordHash })
.from(accountsTable)
.where(eq(lower(accountsTable.email), email.toLowerCase()));Any idea what's occuring here? Doesn't happen with any other database calls including similar calls with the same
.where.where arguments