kysely-org / kysely

A type-safe typescript SQL query builder
https://kysely.dev
MIT License
10.46k stars 268 forks source link

Possible Fix to Issue #768 ERR_UNSUPPORTED_ESM_URL_SCHEME on Windows and other posix #991

Open czuma opened 4 months ago

czuma commented 4 months ago

i was working on a solution for this bug because work on windows and deploy on linux

i tested the solution on windows and ubuntu via (vm), works fine but only if package.json type is set to "module" don't know why the cjs commonJS build don't give me the right result. i run the test on ubuntu and don't give me errors on the migration files so guess is "ok"

maybe i commit an error? check it and let me know, maybe we can fix this.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 4:45am
koskimas commented 4 months ago

Any solution has to work with both ESM and CJS as well as on all js runtimes. Not just node.

igalklebanov commented 4 months ago

Try passing https://github.com/unjs/pathe to constructor.