revalidateTag not work at vercel deploy

When using revalidateTag in Next.js with Edge functions, I encountered an issue because the example code in the Next.js documentation was using 'use server', which prevents exporting runtime = 'edge' because server functions require an async function. This was causing a problem in my setup.

Solution:

I removed the 'use server' directive and directly added export const runtime = 'edge'; in the file. This allowed the Edge function to properly execute, and revalidateTag started working as expected.

and so, It worked!