A minimal reproduction would be appreciated if possible
A minimal reproduction would be appreciated if possible
react-error-boundary to wrap my app like this, and now it catches everything and allowed us to customize the error page:<Image /> component it doesn't work, and no images serve even the static in the public directorypnpm create cloudflare it will initialise a new Next.js project for you. In there, you will find commented out example usage of KV. You can uncomment this in next.config.mjs, env.d.ts, and app/api/hello/route.ts. Then if you run your app, you will see it putting + getting with kvchris.scholarcrafter.com/_next/... when they exist at scholarcrafter.com/_next/...npx wrangler pages deployment tailrevalidateTag and/or revalidatePath? Currently I get an internal server error when trying to call them from Cloudflare Pages. revalidateTag? Any estimations for it?Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response bodies, and others) created in the context of one request handler cannot be accessed from a different request's handler. This is a limitation of Cloudflare Workers which allows us to improve overall performancedeployment tail trick) and create an issue if it's a next-on-pages bug. Thanks @James !https://scholarcrafter.com/chris/, req.url)<ErrorBoundary
onError={(error, errorInfo) => {
if (window.Sentry) {
window.Sentry.captureException(error);
}
}}
fallbackRender={({ error, resetErrorBoundary }) => (
// add your own UI
)}
>
<Component {...pageProps} />
</ErrorBoundary>Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response bodies, and others) created in the context of one request handler cannot be accessed from a different request's handler. This is a limitation of Cloudflare Workers which allows us to improve overall performanceexport async function generateStaticParams() {
const response = await getRequest("PROJECTS");
const projects: Project[] = await response.json();
if (!projects || projects.length === 0) {
return [];
}
return projects.map((project) => ({
name: project.name.toLowerCase().replaceAll(" ", "-"),
}));
}
const Project = async ({ params }: { params: { name: string } }) => {
const response = await getRequest("PROJECTS");
const projects: Project[] = await response.json();
if (!projects || projects.length === 0) {
return <div>No projects available</div>;
}
const specificProject = projects.find(
(project) => project.name.toLowerCase().replaceAll(" ", "-") === params.name
);
if (!specificProject) {
return <div>Project not found</div>;
}
return <ProjectPage project={specificProject} />;
};
export default Project;