Strange Cloudflare Pages Astro Deploy Error

A relatively simple Astro web app with some dynamic routes.

The build deploys just fine but i get a blank screen. on reload i get a 500 error status: GET [HTTP/3 500 32ms]

When trying the build locally with wrangler i get: service core:user:worker: Uncaught Error: No such module “node:path”. On cloudflare i did add the nodejs_compat compatibility flag.

my astro.config.mjs looks like this:

export default defineConfig({
  site: ? : "http://localhost:4321", // TODO: change to actual url
  base: ? : "/",
  trailingSlash: ? "always" : "never",
  image: {
    service: squooshImageService(),

  integrations: [
      config: {
        applyBaseStyles: false,
      imports: [
  markdown: {
    remarkPlugins: [
          test: "Table of contents",
    shikiConfig: {
      theme: "one-dark-pro",
      wrap: true,
    extendDefaultPlugins: true,
  output: "server",
  adapter: cloudflare({
    mode: "directory",
  vite: {
    plugins: [viteTsconfigPaths()],

anyone encountered this strange behavior before or has an idea why it is happening?
thank you in advance for your answer

The only thing i can think of is that I am using the supabase package to authenticate. could this package be the one that is throwing the node compat errors?

import { supabase } from "@/lib/supabase";