K
Kysely•2w ago
Dylel

V0.28 Type Issues

Hey i've been trying to use v0.28 branch, but whenever i install this branch from pnpm all the kysely types break, is there another way for me to use this branch. I tried locally cloning and building but seem to have the same type issues. Typescript just can't find kysely package at all.
Solution:
npm i https://pkg.pr.new/kysely-org/kysely@1278
Jump to solution
23 Replies
Igal (mobile)
Igal (mobile)•2w ago
Hey 👋 What TypeScript version are you using?
Dylel
DylelOP•2w ago
"typescript": "5.5.4", tried upgrading to latest too but that didnt seem to help
Igal (mobile)
Igal (mobile)•2w ago
what typesript version does your ide currently point to? it migth differ from the one installed in the project.
Dylel
DylelOP•2w ago
its using 5.5.4 too
Dylel
DylelOP•2w ago
No description
Igal (mobile)
Igal (mobile)•2w ago
does it export Kysely but as something else?
Dylel
DylelOP•2w ago
Im using "pnpm add https://github.com/kysely-org/kysely#v0.28" to add it, ends up in package.json as "kysely": "github:kysely-org/kysely#v0.28",
Dylel
DylelOP•2w ago
No description
Dylel
DylelOP•2w ago
no dist folder in kysely after install i think this is to do with the tarball, i tried installing from the pull request as i've had success with that before but didn't help
Solution
Igal (mobile)
Igal (mobile)•2w ago
npm i https://pkg.pr.new/kysely-org/kysely@1278
Igal (mobile)
Igal (mobile)•2w ago
try this one instead
Dylel
DylelOP•2w ago
yeah that got it, noice! thanks for that
Igal (mobile)
Igal (mobile)•2w ago
if you install straight from gh, you need to run the build script it packs only things that are committed to the repo
Dylel
DylelOP•2w ago
yeah i went into the directory and run npm run build, but typescript still couldn't find it. But yeah makes sense appreciate the quick response 🙂
Igal
Igal•2w ago
np
Dylel
DylelOP•2w ago
would this create a circular reference? new version blows up my typescript completely // Recursive CTE to get all parent tasks .with("ParentHierarchy", (qb) => qb .selectFrom("UserTasks") .selectAll() .unionAll( qb .selectFrom("tools.Task as t") .innerJoin("ParentHierarchy as ph", "ph.ParentTaskId", "t.TaskId") .selectAll("t"), ), ) Previously this quey would just error, but it just hangs typescript completely now
Igal
Igal•2w ago
Can you try this one without selectAll?
Dylel
DylelOP•2w ago
thats better, it actually resolves now ty
Igal
Igal•2w ago
Can you share the example with selectAll that's crashing for you? kyse.link preferably..
Dylel
DylelOP•2w ago
https://kyse.link/Pw1kd seems to be fine in the playground
Igal
Igal•2w ago
yeah, well it doesn't have to compute all your codebase.. is still believe this can be useful to look at
Dylel
DylelOP•2w ago
i did some digging on my own because my typescript performance is really bad atm
No description
Dylel
DylelOP•2w ago
i think its just the typescript error that i have with the self referencing cte, which is valid sql just not valid kysely/type syntax i have the check expression selected at the bottom
Want results from more Discord servers?
Add your server