Next js cache option in fetch request failing cf pages deploy

For Workes & Pages, what is the name of the domain?

codeflex.pages.dev

What is the error message?

Failed to produce a Cloudflare Pages build from the project. :zap: :zap: The following routes were not configured to run with the Edge Runtime: :zap: - /_not-found :zap: - /index :zap: :zap: Please make sure that all your non-static routes export the following edge runtime route segment config: :zap: export const runtime = ‘edge’;

What is the issue or error you’re encountering

npm run deploy fails with below error when i include {cache: no-cache } and deploys successfully when i remove it. I dont want next js to cache the fetched data automatically.

What steps have you taken to resolve the issue?

tried removing the cache option.

What are the steps to reproduce the issue?

export default async function getLeaderBoard(){
const response = await fetch(${DB_URL}/lb, {cache: no-cache });
if (!response.ok) {
console.error(Failed to fetch leaderboard ${response.status});
return;
}
const json :leaderboard = await response.json();
return json;
}

Screenshot of the error

I believe this explains the problem and how to resolve it, do you have any issues when trying to add that?