Build errors after adding Contentful

Hello, I have a problem with deployment of my website. I deployed it on Cloudflare Pages as a static page and it worked. Later, I added Contentful and tried to get content from Contentful (with async / await) on one page - this generated build errors. I eventually added Vercel and Wrangler, but it stil generates build errors. At the same time the project works fine on Netlify. What may be the reason?

Thank you for any suggestions!

The project: https://goliat.pages.dev/

This is the code of the page that generates errors:

import { documentToReactComponents } from "@contentful/rich-text-react-renderer";
import { unstable_setRequestLocale } from "next-intl/server";
import { client } from "../../../../lib/contentful/client";

export const runtime = "edge";

async function getContentfulContent() {
  const res = await client.getEntries({
    content_type: "privacyPolicy",
  });

  return res.items;
}
export default async function PolitykaPrywatnosci({ params: { locale } }) {
  unstable_setRequestLocale(locale);

  const privacyPolicy = await getContentfulContent();

  return (
    <div className="pt-48">
      <section className="max-w-4xl mx-auto px-8 mb-16">
        <article>
          <h1>{privacyPolicy[0].fields.title}</h1>
          <div className="text-base leading-relaxed my-8">
            {documentToReactComponents(privacyPolicy[0].fields.body)}
          </div>
        </article>
      </section>
    </div>
  );
}

In build log there is a fragment:

16:29:12.663 :warning: Using edge runtime on a page currently disables static generation for that page
16:29:12.888 ▲ EvalError: Code generation from strings disallowed for this context
16:29:12.889 ▲ at Function ()
16:29:12.889 ▲ at 3960 (/opt/buildhome/repo/.next/server/app/[locale]/polityka-prywatnosci/page.js:38:55491)
16:29:12.889 ▲ at o (/opt/buildhome/repo/.next/server/app/[locale]/polityka-prywatnosci/page.js:38:142286)
16:29:12.889 ▲ at /opt/buildhome/repo/.next/server/app/[locale]/polityka-prywatnosci/page.js:38:150579
16:29:12.889 ▲ at /opt/buildhome/repo/.next/server/app/[locale]/polityka-prywatnosci/page.js:38:225008
16:29:12.889 ▲ at 6415 (/opt/buildhome/repo/.next/server/app/[locale]/polityka-prywatnosci/page.js:38:225013)
16:29:12.890 ▲ at webpack_require (/opt/buildhome/repo/.next/server/edge-runtime-webpack.js:25:42)
16:29:12.890 ▲ at 2816 (/opt/buildhome/repo/.next/server/app/[locale]/polityka-prywatnosci/page.js:43:92064)
16:29:12.890 ▲ at Function.webpack_require (/opt/buildhome/repo/.next/server/edge-runtime-webpack.js:25:42)
16:29:12.890 ▲ at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
16:29:12.895 ▲ > Build error occurred
16:29:12.952 ▲ Error: Failed to collect page data for /[locale]/polityka-prywatnosci
16:29:12.953 ▲ at /opt/buildhome/repo/node_modules/next/dist/build/utils.js:1258:15
16:29:12.953 ▲ at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
16:29:12.954 ▲ type: ‘Error’
16:29:12.956 ▲ }
16:29:13.094 ▲ Error: Command npm run build exited with 1