Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: drizzle-orm incorrectly imports @libsql/client causing build failure at the edge. #1123

Closed
mhevery opened this issue Aug 25, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@mhevery
Copy link

mhevery commented Aug 25, 2023

What version of drizzle-orm are you using?

0.28.5

What version of drizzle-kit are you using?

0.19.13

Describe the Bug

Starting with 0.28.4 drizzle-orm imports @libsql/client
See line 4 of https://unpkg.com/browse/drizzle-orm@0.28.4/libsql/index.mjs

NOTE
0.28.3 drizzle-orm DOES NOT imports @libsql/client
See https://unpkg.com/browse/drizzle-orm@0.28.3/libsql/index.mjs

This creates a problem because @libsql/client depends on node, which means it can't be deployed to edge environments. One gets a build error. The correct import for edge is @libsql/client/web

Expected behavior

Do not import @libsql/client

Environment & setup

No response

@mhevery mhevery added the bug Something isn't working label Aug 25, 2023
@dankochetov
Copy link
Contributor

Fixed in #1122, currently available on drizzle-orm@beta and will be included in the next release.

@mhevery
Copy link
Author

mhevery commented Sep 8, 2023

@juliuslipp
Copy link

Is there a workaround to use turso with drizzle on the edge?

Tried @beta but how @mhevery already mentioned, the issue still persists.

@mhevery
Copy link
Author

mhevery commented Sep 29, 2023

Is there a workaround to use turso with drizzle on the edge?

Workaround is to use 0.28.3

@Angelelz
Copy link
Collaborator

Angelelz commented Dec 4, 2023

Seems like this issues is fixed.

@Angelelz Angelelz closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants