suljii
suljii
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
its 18
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
const db =drizzle(database_url, {schema})
const db =drizzle(database_url, {schema})
in that case schema is my unique accounts schema or the object that countain all my schema like {accounts, schema2 ... } ? because i cant use "type":"module" in my package.json dunno why
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
its now findMany() who is undefined again, so he knows my schema
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
ok new error
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
nah, same error
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
const { drizzle } = require('drizzle-orm/node-postgres')
const schemas = require('../../../db/schema')
const { Pool } = require('pg')

const pool = new Pool({
connectionString: 'postgres://postgres:root@localhost:5432/eurotruck'
})
console.log(schemas)

const db = drizzle({ client: pool, schemas })

module.exports = { db }
const { drizzle } = require('drizzle-orm/node-postgres')
const schemas = require('../../../db/schema')
const { Pool } = require('pg')

const pool = new Pool({
connectionString: 'postgres://postgres:root@localhost:5432/eurotruck'
})
console.log(schemas)

const db = drizzle({ client: pool, schemas })

module.exports = { db }
same error
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
yes ive just done it
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
like a findMany
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
can can you show me how you call it?
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
i dont understand how its possible i have to be missing soemthing
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
the problem is : that line is working const manies = await con.select().from(accounts) but that line not working const manies2 = await con.query.accounts.findMany()
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
it is sorry, its my bad i corrected it with my phone
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
[ script:queue] TypeError: Cannot read properties of undefined (reading 'findMany')
[ script:queue] at @queue/server.js:27:50
[ script:queue] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[ script:queue] at async citizen:/scripting/v8/main.js:482:9
[ script:queue] TypeError: Cannot read properties of undefined (reading 'findMany')
[ script:queue] at @queue/server.js:27:50
[ script:queue] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[ script:queue] at async citizen:/scripting/v8/main.js:482:9
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
Its not the error tho
31 replies
DTDrizzle Team
Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
Oh yeah mb didnt put the exports in my example
31 replies