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"],
},
},
});
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
No description
No description
1 Reply
bebraw
bebraw6mo ago
Did you set the compatibility flag? More: https://developers.cloudflare.com/workers/runtime-apis/nodejs/crypto/ that's compatibility_flags = ["nodejs_compat"] in wrangler configuration
Want results from more Discord servers?
Add your server