Hi, I am creating a project with NextJs,in which there are some page functions under /pages/api/xxx.ts.
I have read the docs from NextJs' site to adapt my code to cf pages env by adding the code below
export const config = { runtime: 'edge' };
or
export const runtime = 'edge';
But I got the following error.
17:35:16.870 ▲ info - Creating an optimized production build...
17:35:16.926 ▲ error - Provided runtime "edge" is not supported. Please leave it empty or choose one of: experimental-edge, nodejs
17:35:16.940 ▲ ELIFECYCLE Command failed with exit code 1.
17:35:17.008 ▲ Error: Command "pnpm run build" exited with 1
17:35:17.117 ▲ ERROR Command failed with exit code 1: vercel build
17:35:17.117 ▲
17:35:17.117 ▲ pnpm: Command failed with exit code 1: vercel build
17:35:17.118 ▲ at makeError (/opt/buildhome/.cache/node/corepack/pnpm/8.2.0/dist/pnpm.cjs:24230:17)
17:35:17.118 ▲ at handlePromise (/opt/buildhome/.cache/node/corepack/pnpm/8.2.0/dist/pnpm.cjs:24801:33)
17:35:17.118 ▲ at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
17:35:17.118 ▲ at async Object.handler [as dlx] (/opt/buildhome/.cache/node/corepack/pnpm/8.2.0/dist/pnpm.cjs:206486:7)
17:35:17.118 ▲ at async /opt/buildhome/.cache/node/corepack/pnpm/8.2.0/dist/pnpm.cjs:215818:21
I don't know why, thanks for your help.