Does node-postgres work on pages?
I'm trying to set up drizzle ORM with node-postgres on my SvelteKit pages application and get build errors about lack of support for some node imports.
I've tried both nodejs_compat and node_compat, but the same issues persist.
1 Reply
node-postgres does not work on pages unless you implement some sort of polyfill.
the easiest alternative is to use postgresJS, which is supported with the nodejs_compat flag. (https://discord.com/channels/595317990191398933/789155108529111069/1219085868220944434)
big thanks to the people who helped me in #pages-discussions.