I am trying to deploy a project that I created with Nextjs. The project builds easily locally with 'npm run build' or 'npx next build'. But when I try to deploy to Vercel, I get the following error.
1[23:09:55.268] Running build in Washington, D.C., USA (East) – iad12[23:09:55.374] Cloning github.com/papeiron/Next.js-Ecommerce-App (Branch: main, Commit: 37ddc96)3[23:09:55.382] Skipping build cache, deployment was triggered without cache.4[23:09:55.764] Cloning completed: 389.029ms5[23:09:56.720] Running "vercel build"6[23:09:57.224] Vercel CLI 37.6.17[23:09:57.649] Installing dependencies...8[23:10:01.234] npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported9[23:10:01.765] npm warn deprecated npmlog@5.0.1: This package is no longer supported.10[23:10:02.289] npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.11[23:10:02.750] npm warn deprecated gauge@3.0.2: This package is no longer supported.12[23:10:02.859] npm warn deprecated fstream@1.0.12: This package is no longer supported.13[23:10:04.299] npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.14[23:10:04.388] npm warn deprecated @types/react-leaflet@3.0.0: This is a stub types definition. react-leaflet provides its own type definitions, so you do not need this installed.15[23:10:04.438] npm warn deprecated @types/exceljs@1.3.0: This is a stub types definition. exceljs provides its own type definitions, so you do not need this installed.16[23:10:05.342] npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead17[23:10:05.343] npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead18[23:10:05.569] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported19[23:10:05.719] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported20[23:10:05.797] npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported21[23:10:05.797] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported22[23:10:05.944] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported23[23:10:18.750] 24[23:10:18.751] added 730 packages in 21s25[23:10:18.751] 26[23:10:18.751] 170 packages are looking for funding27[23:10:18.751] run `npm fund` for details28[23:10:18.776] Detected Next.js version: 14.2.429[23:10:18.776] Running "npx prisma generate && next build"30[23:10:19.748] Prisma schema loaded from prisma/schema.prisma31[23:10:20.573] 32[23:10:20.573] ✔ Generated Prisma Client (v5.20.0) to ./node_modules/@prisma/client in 326ms33[23:10:20.573] 34[23:10:20.573] Start by importing your Prisma Client (See: http://pris.ly/d/importing-client)35[23:10:20.573] 36[23:10:20.573] Tip: Want real-time updates to your database without manual polling? Discover how with Pulse: https://pris.ly/tip-0-pulse37[23:10:20.573] 38[23:10:21.826] Attention: Next.js now collects completely anonymous telemetry regarding usage.39[23:10:21.826] This information is used to shape Next.js' roadmap and prioritize features.40[23:10:21.826] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:41[23:10:21.826] https://nextjs.org/telemetry42[23:10:21.826] 43[23:10:21.890] ▲ Next.js 14.2.444[23:10:21.891] 45[23:10:21.975] Creating an optimized production build ...46[23:11:19.723] ⚠ Compiled with warnings47[23:11:19.723] 48[23:11:19.723] ./node_modules/bcryptjs/dist/bcrypt.js49[23:11:19.723] A Node.js API is used (process.nextTick at line: 351) which is not supported in the Edge Runtime.50[23:11:19.723] Learn more: https://nextjs.org/docs/api-reference/edge-runtime51[23:11:19.723] 52[23:11:19.724] Import trace for requested module:53[23:11:19.724] ./node_modules/bcryptjs/dist/bcrypt.js54[23:11:19.724] ./src/config/auth.config.ts55[23:11:19.724] 56[23:11:19.724] ./node_modules/bcryptjs/dist/bcrypt.js57[23:11:19.724] A Node.js API is used (setImmediate at line: 352) which is not supported in the Edge Runtime.58[23:11:19.724] Learn more: https://nextjs.org/docs/api-reference/edge-runtime59[23:11:19.724] 60[23:11:19.724] Import trace for requested module:61[23:11:19.724] ./node_modules/bcryptjs/dist/bcrypt.js62[23:11:19.724] ./src/config/auth.config.ts63[23:11:19.724] 64[23:11:19.724] ./node_modules/bcryptjs/dist/bcrypt.js65[23:11:19.724] A Node.js API is used (setImmediate at line: 352) which is not supported in the Edge Runtime.66[23:11:19.724] Learn more: https://nextjs.org/docs/api-reference/edge-runtime67[23:11:19.724] 68[23:11:19.724] Import trace for requested module:69[23:11:19.724] ./node_modules/bcryptjs/dist/bcrypt.js70[23:11:19.724] ./src/config/auth.config.ts71[23:11:19.724] 72[23:11:19.724] ./node_modules/bcryptjs/dist/bcrypt.js73[23:11:19.724] A Node.js API is used (process.nextTick at line: 352) which is not supported in the Edge Runtime.74[23:11:19.724] Learn more: https://nextjs.org/docs/api-reference/edge-runtime75[23:11:19.724] 76[23:11:19.724] Import trace for requested module:77[23:11:19.724] ./node_modules/bcryptjs/dist/bcrypt.js78[23:11:19.724] ./src/config/auth.config.ts79[23:11:19.724] 80[23:11:44.673] ✓ Compiled successfully81[23:11:44.674] Linting and checking validity of types ...82[23:11:56.978] Collecting page data ...83[23:11:58.221] Error: Couldn't fetch categories84[23:11:58.222] at c (/vercel/path0/.next/server/chunks/1249.js:1:17744)85[23:11:58.222] at async Object.l [as generateStaticParams] (/vercel/path0/.next/server/app/(customerFacing)/c/[category-slug]/page.js:1:6554)86[23:11:58.222] at async buildParams (/vercel/path0/node_modules/next/dist/build/utils.js:1026:40)87[23:11:58.222] at async /vercel/path0/node_modules/next/dist/build/utils.js:1043:3388[23:11:58.222] at async /vercel/path0/node_modules/next/dist/build/utils.js:1177:11489[23:11:58.223] at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:154:20)90[23:11:58.224] 91[23:11:58.224] > Build error occurred92[23:11:58.226] Error: Failed to collect page data for /c/[category-slug]93[23:11:58.226] at /vercel/path0/node_modules/next/dist/build/utils.js:1268:15 {94[23:11:58.226] type: 'Error'95[23:11:58.226] }96[23:11:58.250] Error: Command "npx prisma generate && next build" exited with 197[23:11:59.199]