kysely-org / kysely-ctl

Command-line tool for Kysely
MIT License
50 stars 2 forks source link

ERROR: Could not find the version of the CLI #5

Closed jkonowitch closed 2 months ago

jkonowitch commented 2 months ago

It appears the CLI is looking at the version of my application package (which is in a monorepo, using pnpm workspaces, and is not versioned) rather than the version of kysely-ctl.

 ERROR  Could not find the version of the CLI

  at getCLIInstalledVersion (/PROJECT/node_modules/.pnpm/kysely-ctl@0.4.0_c12@1.10.0_citty@0.1.6_consola@3.2.3_kysely@0.27.3_nypm@0.3.8_pathe@1.1.2_pk_2dkvxtov55pjiwaee5hspcr3bm/node_modules/kysely-ctl/dist/bin.js:77:11)
igalklebanov commented 2 months ago

Hey 👋

Try using --no-outdated-check flag for now. Will be fixed ASAP.

jkonowitch commented 2 months ago

Ok! I just tried locally, and adding const { version } = await readPackageJSON(undefined, { startingFrom: import.meta.dirname}); fixed the issue

https://github.com/kysely-org/kysely-ctl/blob/bf7d9947651e77a10aea8d080d6b39d83b2695d1/src/utils/version.mts#L15

jkonowitch commented 2 months ago

HA! You actually already fixed it in main 😎

igalklebanov commented 2 months ago

Yeah that should be the direction. Just released 0.4.1, hope it fixes this. If not, I'd love a small reproduction repository.

jkonowitch commented 2 months ago

Yes, that fixed it 👍