porsager / postgres

Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare
The Unlicense
7.26k stars 262 forks source link

Error: dependencies are imported but could not be resolved: cloudflare:sockets #691

Closed jadbox closed 10 months ago

jadbox commented 11 months ago

I'm using another Vite project that is not meant to deploy on Cloudflare. However, it's not complaining about the import listed for cloudflare:sockets. Is there a work around in the library to not trip this error for non-cloudflare projects?

Error: The following dependencies are imported but could not be resolved: cloudflare:sockets
porsager commented 10 months ago

I think the bundler should have a way to choose the right export. If not, I'll end up adding every single bundler name to the exports, and then we'll hit the next problem. Suddenly someone want's to use those bundlers with Cloudflare 😅

porsager commented 10 months ago

Did you find any way around this?