{"record":{"id":"73239d38fb464494","repo":"withastro/astro","slug":"your-project-is-being-built-for-node-js-major","errorCode":null,"errorMessage":"\n\tYour project is being built for Node.js ${major} as the runtime.\n\tThis version is deprecated by Vercel Serverless Functions.\n\tConsider upgrading your local version to 24.\n","messagePattern":"\n\tYour project is being built for Node\\.js (.+?) as the runtime\\.\n\tThis version is deprecated by Vercel Serverless Functions\\.\n\tConsider upgrading your local version to 24\\.\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/integrations/vercel/src/index.ts","lineNumber":818,"sourceCode":"\tif (support.status === 'default' || support.status === 'available') {\n\t\treturn `nodejs${major}.x`;\n\t}\n\tif (support.status === 'retiring') {\n\t\tif (support.warnDate && new Date() >= support.warnDate) {\n\t\t\tlogger.warn(\n\t\t\t\t`Your project is being built for Node.js ${major} as the runtime, which is retiring by ${support.removal}.`,\n\t\t\t);\n\t\t}\n\t\treturn `nodejs${major}.x`;\n\t}\n\tif (support.status === 'beta') {\n\t\tlogger.warn(\n\t\t\t`Your project is being built for Node.js ${major} as the runtime, which is currently in beta for Vercel Serverless Functions.`,\n\t\t);\n\t\treturn `nodejs${major}.x`;\n\t}\n\tif (support.status === 'deprecated') {\n\t\tlogger.warn(\n\t\t\t`\\n` +\n\t\t\t\t`\\tYour project is being built for Node.js ${major} as the runtime.\\n` +\n\t\t\t\t`\\tThis version is deprecated by Vercel Serverless Functions.\\n` +\n\t\t\t\t`\\tConsider upgrading your local version to 24.\\n`,\n\t\t);\n\t\treturn `nodejs${major}.x`;\n\t}\n\treturn 'nodejs24.x';\n}\n\nfunction createRoutesWithStaticHeaders(\n\tstaticHeaders: RouteToHeaders,\n\tconfig: AstroConfig,\n): RouteWithSrc[] {\n\tconst vercelHeaders: RouteWithSrc[] = [];\n\tfor (const [pathname, { headers }] of staticHeaders.entries()) {\n\t\tif (config.security.csp) {\n\t\t\tconst csp = headers.get('Content-Security-Policy');","sourceCodeStart":800,"sourceCodeEnd":836,"githubUrl":"https://github.com/withastro/astro/blob/3578d45d34226d63cff3d261c971c221de6794d2/packages/integrations/vercel/src/index.ts#L800-L836","documentation":"@astrojs/vercel's getRuntime() (packages/integrations/vercel/src/index.ts:771) maps your local Node.js major to a Vercel Serverless runtime using the SUPPORTED_NODE_VERSIONS table. When the entry has status 'deprecated' (currently Node 18), it prints this multi-line warning and still returns `nodejs18.x` — the build succeeds, but you are deploying to a runtime Vercel no longer supports and which may break or be force-upgraded at any time. Unlike the 'not supported at all' path (which silently falls back to `nodejs24.x`), the deprecated path preserves your major, so local and deployed behavior stay consistent until you upgrade.","triggerScenarios":"Running `astro build` with @astrojs/vercel while `process.version` starts with a major whose SUPPORTED_NODE_VERSIONS entry is `{status:'deprecated'}` — currently Node 18 (`18: {status:'deprecated'}` at line 98). Concretely: `node -v` shows v18.x and the Vercel adapter builds serverless output.","commonSituations":"Legacy projects pinned to Node 18 via `engines.node`, `.nvmrc`, or a Dockerfile; CI images (e.g. old GitHub Actions setup-node or a stale base image) still on Node 18; local machines that never moved off the Node 18 LTS line after Vercel deprecated it.","solutions":["Upgrade to Node 24 (the recommended default): update `.nvmrc`/`.node-version`/CI setup-node version to 24, reinstall dependencies, and rebuild.","If 24 is not viable yet, upgrade to a major with status 'available' (20 or 22) as an intermediate step.","Update @astrojs/vercel to the latest version so its deprecation table reflects Vercel's current policy and the suggested target major is accurate.","After upgrading, remove and reinstall node_modules and lockfile entries built under Node 18 (native deps like esbuild/sharp may need rebuilding for the new major)."],"exampleFix":"# before: .github/workflows/deploy.yml\n- uses: actions/setup-node@v4\n  with: { node-version: 18 }\n\n# after\n- uses: actions/setup-node@v4\n  with: { node-version: 24 }","handlingStrategy":"validation","validationCode":"// preflight: fail if the build machine runs a Vercel-deprecated Node major\nconst major = Number(process.version.slice(1).split('.')[0]);\nif (major <= 18) {\n  throw new Error(`Node ${major} is deprecated on Vercel Serverless — upgrade to 24`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin `.nvmrc`, Dockerfile `FROM node:24`, and CI `node-version: 24` to the same supported major so local, CI, and Vercel runtimes never diverge.","Run a scheduled dependency/Node freshness check (e.g. Dependabot on the CI base image) so deprecated runtimes surface as PRs instead of build warnings.","When the warning appears, act on it immediately — the deprecated runtime keeps building today but can be force-migrated or broken by Vercel without notice."],"tags":["vercel","nodejs","deprecation","runtime","build-warning","serverless","node18"],"backgroundTag":"nodejs-runtime-version-unsupported","analyzedSha":"3578d45d34226d63cff3d261c971c221de6794d2","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}