Build SSR Astro

When i try deploy my web it gives me an error in the build

I solved it with this config in astro.config.mjs
import { defineConfig } from "astro/config";
import preact from "@astrojs/preact";
import tailwind from "@astrojs/tailwind";
import cloudflare from "@astrojs/cloudflare";

// https://astro.build/config
export default defineConfig({
  integrations: [
    preact({
      compat: true,
    }),
    tailwind(),
  ],
  output: "server",
  adapter: cloudflare(),
  vite: {
    ssr: {
      external: ["oslo", "nodemailer", "pg"],
    },
  },
});

and now it throws me this error
Was this page helpful?