I'm just getting started with astro (and I'm loving it!). I've created an app that pulls content from our postgres db and works in dev. If I use a node adapter I'm able to run a build succesfully but if I try to use the cloudflare adapter, I get the following error when I run the build:
[commonjs--resolver] [plugin vite:resolve] Cannot bundle Node.js built-in "node:events" imported from "node_modules/postgres/cf/polyfills.js". Consider disabling ssr.noExternal or remove the built-in dependency.
My astro.config.mjs looks like this:
import { defineConfig } from 'astro/config';
import cloudflare from '<@&1055234544183287879>/cloudflare';
// https://astro.build/config
export default defineConfig({
output: 'server',
adapter: cloudflare(),
});