Able to run this build locally fine but on Vercel it says:
[12:28:25.688] Running build in Washington, D.C., USA (East) – iad1[12:28:25.689] Build machine configuration: 2 cores, 8 GB[12:28:25.702] Cloning github.com/Sid-AutoWisdom/autowisdom-frontend (Branch: ft/dashboard, Commit: 9acf76e)[12:28:26.776] Cloning completed: 1.074s[12:28:29.260] Restored build cache from previous deployment (3Zrh8Hz4p1BQLHGoirUEaptufJfN)[12:28:31.060] Running "vercel build"[12:28:32.087] Vercel CLI 44.5.0[12:28:32.441] Installing dependencies...[12:28:34.591] [12:28:34.592] up to date in 2s[12:28:34.592] [12:28:34.592] 249 packages are looking for funding[12:28:34.593] run `npm fund` for details[12:28:34.621] Detected Next.js version: 15.4.4[12:28:34.628] Running "npm run build"[12:28:34.742] [12:28:34.743] > autowisdom-frontend@0.1.0 build[12:28:34.743] > next build[12:28:34.744] [12:28:35.922] ▲ Next.js 15.4.4[12:28:35.924] - Experiments (use with caution):[12:28:35.924] ✓ optimizeCss[12:28:35.924] [12:28:35.964] Creating an optimized production build ...[12:29:12.130] ✓ Compiled successfully in 36.0s[12:29:12.137] Linting and checking validity of types ...[12:29:33.440] Collecting page data ...[12:29:37.395] Generating static pages (0/27) ...[12:29:38.761] Generating static pages (6/27) [12:29:39.120] Generating static pages (13/27) package.json:
{ "name": "autowisdom-frontend", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@heroui/framer-utils": "^2.1.19", "@radix-ui/react-accordion": "^1.2.3", "@radix-ui/react-checkbox": "^1.3.2", "@radix-ui/react-dialog": "^1.1.6", "@radix-ui/react-dropdown-menu": "^2.1.6", "@radix-ui/react-label": "^2.1.2", "@radix-ui/react-popover": "^1.1.6", "@radix-ui/react-progress": "^1.1.2", "@radix-ui/react-radio-group": "^1.3.7", "@radix-ui/react-scroll-area": "^1.2.3", "@radix-ui/react-select": "^2.1.6", "@radix-ui/react-separator": "^1.1.2", "@radix-ui/react-slider": "^1.2.3", "@radix-ui/react-slot": "^1.2.0", "@radix-ui/react-switch": "^1.2.5", "@radix-ui/react-tabs": "^1.1.3", "@radix-ui/react-toast": "^1.2.6", "@radix-ui/react-tooltip": "^1.1.8", "@tiptap/core": "^2.11.7",vercel.json:
{ "redirects": [ { "source": "/consult-us-car-consultancy", "destination": "/consultation", "permanent": true } ] }next.config.ts: i
mport type { NextConfig } from "next";import type { Configuration as WebpackConfiguration } from "webpack";// Helper function to parse a single domain environment variableconst parseBackendUrl = (envVariable: string | undefined): Array<{ protocol: "http" | "https"; hostname: string; port?: string; pathname: string;}> => { if (!envVariable) return []; try { // Clean up the URL in case it has @next.config.ts or other artifacts const cleanUrl = envVariable.split('@')[0].trim(); const url = new URL(cleanUrl); return [ { protocol: url.protocol.replace(":", "") as "http" | "https", // Remove the trailing ":" hostname: url.hostname, port: url.port || undefined, // Include port if present pathname: "/**", // Match all paths under this domain }, ]; } catch (error) { console.error(`Invalid URL in NEXT_PUBLIC_BACKEND_URL: ${envVariable}`); return []; }};// Parse the backend URL into a remotePatterns array