{"record":{"id":"8d7ea30dfb195587","repo":"withastro/astro","slug":"your-project-is-being-built-for-node-js-major-a","errorCode":null,"errorMessage":"Your project is being built for Node.js ${major} as the runtime, which is retiring by ${support.removal}.","messagePattern":"Your project is being built for Node\\.js (.+?) as the runtime, which is retiring by (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/integrations/vercel/src/index.ts","lineNumber":805,"sourceCode":"function getRuntime(process: NodeJS.Process, logger: AstroIntegrationLogger): Runtime {\n\tconst version = process.version.slice(1); // 'v18.19.0' --> '18.19.0'\n\tconst major = version.split('.')[0]; // '18.19.0' --> '18'\n\tconst support = SUPPORTED_NODE_VERSIONS[major];\n\tif (support === undefined) {\n\t\tlogger.warn(\n\t\t\t`\\n` +\n\t\t\t\t`\\tThe local Node.js version (${major}) is not supported by Vercel Serverless Functions.\\n` +\n\t\t\t\t`\\tYour project will use Node.js 24 as the runtime instead.\\n` +\n\t\t\t\t`\\tConsider switching your local version to 24.\\n`,\n\t\t);\n\t\treturn 'nodejs24.x';\n\t}\n\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);","sourceCodeStart":787,"sourceCodeEnd":823,"githubUrl":"https://github.com/withastro/astro/blob/3578d45d34226d63cff3d261c971c221de6794d2/packages/integrations/vercel/src/index.ts#L787-L823","documentation":"During `astro build`, the @astrojs/vercel adapter runs getRuntime() (packages/integrations/vercel/src/index.ts:771) to map your local Node.js major version to a Vercel Serverless Functions runtime string. If that major is listed in SUPPORTED_NODE_VERSIONS with status 'retiring' and today's date is past its warnDate, the adapter logs this warning and still returns `nodejs<major>.x`. It is a deprecation notice, not a build failure: your build succeeds and deploys on the retiring runtime until Vercel actually removes it.","triggerScenarios":"Running `astro build` (or `vercel build`) with @astrojs/vercel while `process.version`'s major is marked `{status:'retiring', warnDate, removal}` in the adapter's SUPPORTED_NODE_VERSIONS table (line 78) and `new Date() >= support.warnDate`. In the current table no major has status 'retiring' (18=deprecated, 20/22=available, 24=default), so this fires only once the adapter ships a 'retiring' entry — e.g. when Vercel announces removal of Node 20 or 22 — or in older/newer adapter versions whose table differs.","commonSituations":"A local dev machine or CI image pinned to a Node major that Vercel has scheduled for removal (stale `.nvmrc`, `engines.node`, or a Docker/CI image never updated); upgrading @astrojs/vercel to a release whose table newly marks your Node version as retiring; building on Node 20 or 22 after Vercel announces their retirement window.","solutions":["Upgrade the local/CI Node.js to 24 (the current 'default' runtime): update `.nvmrc`/`.node-version` to 24 and re-run the build — the warning disappears and you build against the supported default.","If you cannot move to 24 yet, move to another major with status 'available' (currently 20 or 22) so you are outside the retirement window.","Update @astrojs/vercel to the latest version so its SUPPORTED_NODE_VERSIONS table matches Vercel's current support policy; the table is adapter-version-dependent.","If you must stay on the retiring major short-term, treat the `support.removal` date in the message as a hard deadline and schedule the upgrade before it — after removal, Vercel rejects or re-routes the runtime."],"exampleFix":"# before (.nvmrc)\n20\n\n# after (.nvmrc)\n24\n\n# then rebuild\nnvm use && pnpm build","handlingStrategy":"validation","validationCode":"// before building with the Vercel adapter, fail fast on a bad local Node major\nimport { execSync } from 'node:child_process';\nconst major = Number(process.version.slice(1).split('.')[0]);\nconst supported = { 20: 'available', 22: 'available', 24: 'default' };\nif (!supported[major]) {\n  throw new Error(`Node ${major} is not 'available'/'default' on Vercel — switch to 24`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the Node version used for builds in .nvmrc / .node-version and CI setup-node to the major Vercel lists as 'default' (currently 24), so the local build runtime always matches production.","Add an `engines.node` field (e.g. \">=24\") plus `engine-strict=true` (pnpm) or an install script check so mismatched environments fail before build.","Keep @astrojs/vercel updated; its SUPPORTED_NODE_VERSIONS table is the source of the retiring/beta/deprecated statuses and changes as Vercel revises support.","Treat any runtime-support warning from the adapter as CI noise to fix (upgrade Node), not suppress — the retirement date in the message is a real deploy deadline."],"tags":["vercel","nodejs","runtime","deprecation","build-warning","serverless"],"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"}