You’d need to run the fetch in a server section of your Next.js code
You’d need to run the fetch in a server section of your Next.js code

{ next: { revalidate: ... } }When you opt for a route to be revalidated on an interval (export const revalidate = 10;), 
durableObjects: {
name: "CLOUDFLARE_DO",
className: "Counter",
// scriptName: "cloudflare-do",
},Warning:
You have requested Durable Objects but no local instance of such has been found.
In order to access your Durable Objects please start the relevant workers locally
with `wrangler dev` and then restart the next dev server.
The following bindings won't be accessible until then:
- name
- classNameconst DurableObjectPage = async ({}: DurableObjectPageProps) => {
console.log(process.env.CLOUDFLARE_DO);
const res = await process.env.CLOUDFLARE_DO.fetch();
console.log({ res });
return (
<>
<h1>Durable Object</h1>
{res}
</>
);
};
export default DurableObjectPage;12:12:23.387 Detected the following tools from environment: npm@9.6.7, nodejs@18.17.1
12:12:23.388 Installing project dependencies: npm clean-install --progress=false
12:12:27.033 npm ERR! code ERESOLVE
12:12:27.042 npm ERR! ERESOLVE could not resolve
12:12:27.042 npm ERR!
12:12:27.043 npm ERR! While resolving: @material-ui/core@4.12.4
12:12:27.043 npm ERR! Found: @types/react@18.2.45
12:12:27.043 npm ERR! node_modules/@types/react
12:12:27.043 npm ERR! dev @types/react@"^18" from the root project
12:12:27.043 npm ERR! peerOptional @types/react@"*" from @material-ui/types@5.1.0
12:12:27.044 npm ERR! node_modules/@material-ui/types{ next: { revalidate: ... } }When you opt for a route to be revalidated on an interval (export const revalidate = 10;),