```console ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project. ⚡️ ⚡️ The fo
right....
⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
⚡️
⚡️ The following routes were not configured to run with the Edge Runtime:
⚡️ - /favicon.icoYARN_VERSION = 1workers.api.error.script_too_large the idea is that the _worker.js output/static/ should be less than 1mib (free) or less than how much for paid? the workers documentation says 10mib, and in pages it says 25mib but i think thats referencing static assets only. in discord i have seen conversations referencing 5mib_worker.js folder or to check the /output/static/ folder itself (minus what is excluded from _routes.json ?sanitize-html and it happy path works, but in github, this user says it has issues: https://github.com/apostrophecms/sanitize-html/issues/639#issuecomment-1992159751, if anyone has a preferred lib super open to any suggestions

dompurify, but definitely will give it a go if sanitize-html doesn't workout!workers.api.error.script_too_largeError: Disallowed operation called within global scope. Asynchronous I/O (ex: fetch() or connect()), setting a timeout, and generating random values are not allowed within global scope. To fix this error, perform this operation within a handler. https://developers.cloudflare.com/workers/runtime-apis/handlers/
Full stack trace varies depending on when the error occurred, but it typically involves files in the .vercel/output/static/_worker.js directory.src/pages/api/signup.js api route that uses fetch to do a POST request to another app. When deploying it, the build failed and I needed to add the export const config = { runtime: 'experimental-edge' }; export to the api functionreq, res which are the parameters passed into the handler function don't work. The fetch API doesn't respect the method parameter I set and is still just doing a GET request.export const runtime = 'edge'
"pages:build": "npx @cloudflare/next-on-pages"
YARN_VERSIONimport { EmailMessage } from "cloudflare:email";
import { createMimeMessage } from "mimetext";
export default {
async fetch(request, env) {
const msg = createMimeMessage();
msg.setSender({ name: "GPT-4", addr: "<SENDER>@example.com" });
msg.setRecipient("<RECIPIENT>@example.com");
msg.setSubject("An email generated in a worker");
msg.addMessage({
contentType: 'text/plain',
data: `Congratulations, you just sent an email from a worker.`
});
var message = new EmailMessage(
"<SENDER>@example.com",
"<RECIPIENT>@example.com",
msg.asRaw()
);
try {
await env.SEB.send(message);
} catch (e) {
return new Response(e.message);
}
return new Response("Hello Send Email World!");
},
};workers.api.error.script_too_largeworkers.api.error.script_too_large_worker.js_worker.jsoutput/static//output/static/sanitize-htmlsanitize-html17:56:34.326 ▲ Module not found: Can't resolve '@/app/components/sidebar/App'
17:56:34.326 ▲ 1 | "use client";
17:56:34.327 ▲ 2 |
17:56:34.327 ▲ > 3 | import Sidebar from "@/app/components/sidebar/App";
17:56:34.327 ▲ | ^
17:56:34.327 ▲ 4 | import { usePathname } from "next/navigation";
17:56:34.328 ▲ 5 |
17:56:34.328 ▲ 6 | export default function BackendLayout({
17:56:34.328 ▲
17:56:34.328 ▲ https://nextjs.org/docs/messages/module-not-founddompurifyError: Disallowed operation called within global scope. Asynchronous I/O (ex: fetch() or connect()), setting a timeout, and generating random values are not allowed within global scope. To fix this error, perform this operation within a handler. https://developers.cloudflare.com/workers/runtime-apis/handlers/
Full stack trace varies depending on when the error occurred, but it typically involves files in the .vercel/output/static/_worker.js directory.src/pages/api/signup.jsexport const config = { runtime: 'experimental-edge' };req, resmethodexport const runtime = 'edge'"pages:build": "npx @cloudflare/next-on-pages"