withastro/astro · warning

Your project is being built for Node.js ${major} as the runt

Error message

Your project is being built for Node.js ${major} as the runtime, which is currently in beta for Vercel Serverless Functions.

What it means

@astrojs/vercel's getRuntime() (packages/integrations/vercel/src/index.ts:771) checks your local Node.js major against its SUPPORTED_NODE_VERSIONS table before emitting the `nodejs<major>.x` runtime for serverless functions. When the entry has status 'beta', the adapter warns that the runtime is in beta for Vercel Serverless Functions and returns your major anyway, so the build completes on an unproven runtime. It is purely informational — nothing fails — but a beta runtime can have bugs, behavioral differences, or sudden changes on Vercel's side.

Source

Thrown at packages/integrations/vercel/src/index.ts:812

				`\tThe local Node.js version (${major}) is not supported by Vercel Serverless Functions.\n` +
				`\tYour project will use Node.js 24 as the runtime instead.\n` +
				`\tConsider switching your local version to 24.\n`,
		);
		return 'nodejs24.x';
	}
	if (support.status === 'default' || support.status === 'available') {
		return `nodejs${major}.x`;
	}
	if (support.status === 'retiring') {
		if (support.warnDate && new Date() >= support.warnDate) {
			logger.warn(
				`Your project is being built for Node.js ${major} as the runtime, which is retiring by ${support.removal}.`,
			);
		}
		return `nodejs${major}.x`;
	}
	if (support.status === 'beta') {
		logger.warn(
			`Your project is being built for Node.js ${major} as the runtime, which is currently in beta for Vercel Serverless Functions.`,
		);
		return `nodejs${major}.x`;
	}
	if (support.status === 'deprecated') {
		logger.warn(
			`\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`,
		);
		return `nodejs${major}.x`;
	}
	return 'nodejs24.x';
}

function createRoutesWithStaticHeaders(
	staticHeaders: RouteToHeaders,

View on GitHub (pinned to 3578d45d34)

Solutions

  1. Switch local/CI Node to the current 'default' major (24): update `.nvmrc`/`engines.node` and rebuild to run on the fully supported runtime.
  2. Update @astrojs/vercel to the latest release — its SUPPORTED_NODE_VERSIONS table may already list your major as 'available' or 'default'.
  3. If you intentionally want to test the beta runtime, keep the Node version but monitor Vercel's Node.js runtime docs for promotion or breaking changes.

Example fix

# before: engines in package.json
"engines": { "node": "26" }

# after
"engines": { "node": ">=24" }

# .nvmrc
24
Defensive patterns

Strategy: validation

Validate before calling

// assert the local Node major is not flagged beta/retiring/deprecated before `astro build`
const major = Number(process.version.slice(1).split('.')[0]);
const bad = new Set([18]); // extend with majors the adapter flags beta/retiring as they appear
if (bad.has(major)) {
  console.error(`Refusing to build on Node ${major} — switch to a stable Vercel runtime (24)`);
  process.exit(1);
}

Prevention

When it happens

Trigger: Running `astro build` with @astrojs/vercel while `process.version`'s major maps to `{status:'beta'}` in SUPPORTED_NODE_VERSIONS (line 78). No current entry has status 'beta' (18=deprecated, 20/22=available, 24=default), so this fires only with an adapter version whose table marks a major as beta — typically a newly released Node major before Vercel promotes it, e.g. building on Node 26 with an adapter that lists it as beta.

Common situations: Running the newest Node.js release (installed via nvm/homebrew/volta defaults) before Vercel graduates it to 'available'; a CI image updated to a bleeding-edge Node; using an old pinned adapter whose beta entry for what is now a stable runtime was never updated.

Related errors


AI-assisted analysis of withastro/astro@3578d45d34 (2026-08-18). Data as JSON: /api/errors/8c44edd5e14baad9. Report an issue: GitHub.