sveltejs/kit · error · Error
Unsupported runtime: ${key}. Supported runtimes are: ${valid
Error message
Unsupported runtime: ${key}. Supported runtimes are: ${valid_runtimes.join(', ')}. See the Node.js Version section in your Vercel project settings for info on the currently supported versions. What it means
The adapter validates the configured `runtime` value against the list of runtimes Vercel currently supports (nodejs22.x, nodejs24.x, bun1.x). An unrecognized value in the adapter config causes this throw at resolve_runtime time.
Source
Thrown at packages/adapter-vercel/utils.js:115
}
return `nodejs${/** @type {22 | 24} */ (major)}.x`;
}
throw new Error(
'Could not auto-detect a runtime. Please explicitly specify a runtime in your adapter configuration.'
);
}
const valid_runtimes = /** @type {const} */ (['nodejs22.x', 'nodejs24.x', 'bun1.x']);
/**
* @param {string} key
* @returns {asserts key is RuntimeKey}
*/
function assert_is_valid_runtime(key) {
if (!valid_runtimes.includes(/** @type {RuntimeKey} */ (key))) {
throw new Error(
`Unsupported runtime: ${key}. Supported runtimes are: ${valid_runtimes.join(', ')}. See the Node.js Version section in your Vercel project settings for info on the currently supported versions.`
);
}
}
/** @typedef {typeof valid_runtimes[number]} RuntimeKey */
View on GitHub (pinned to 03f1687fe6)
Solutions
- Change the `runtime` value in svelte.config.js to a supported one: 'nodejs22.x', 'nodejs24.x', or 'bun1.x'
- Remove the runtime option entirely to let the adapter auto-detect
- Check the Node.js Version section of your Vercel project settings for currently supported versions
Example fix
// before
adapter: adapter({ runtime: 'nodejs18.x' })
// after
adapter: adapter({ runtime: 'nodejs22.x' }) Defensive patterns
Strategy: validation
Validate before calling
const valid = ['nodejs22.x', 'nodejs24.x', 'bun1.x'];
if (!valid.includes(adapterOptions.runtime)) {
throw new Error(`runtime must be one of ${valid.join(', ')}`);
} Prevention
- Only use runtimes listed in the adapter's current docs
- Re-check runtime config after every adapter major upgrade
- Mirror the value from your Vercel project's Node.js Version setting
When it happens
Trigger: `resolve_runtime` calls `assert_is_valid_runtime` with a `runtime` option that is not one of 'nodejs22.x', 'nodejs24.x', 'bun1.x'.
Common situations: Upgrading the adapter after Vercel dropped older runtimes (e.g. still configured with nodejs18.x or nodejs20.x), typos like 'node20.x', or copying config from an outdated guide.
Related errors
- Could not auto-detect a runtime. Please explicitly specify a
- Warning: vercel.json defines cron tasks that use paths that
- Invalid value for environment variable ${name}: ${JSON.strin
- The `edge` runtime is no longer supported
- Could not find entry point
AI-assisted analysis of sveltejs/kit@03f1687fe6 (2026-09-02).
Data as JSON: /api/errors/528bd4024dcf63f8.
Report an issue: GitHub.