sveltejs/kit · info

If you plan to continue deploying to ${match.name}, conside

Error message

If you plan to continue deploying to ${match.name}, consider replacing @sveltejs/adapter-auto with ${match.module}. This will give you faster installs and more control over deployment configuration.

What it means

adapter-auto detects the deployment platform and, when possible, installs the matching concrete adapter as a peer dependency at build time. After installing, it logs this notice suggesting you add the specific adapter (e.g. @sveltejs/adapter-vercel) to devDependencies yourself for faster installs and direct control.

Source

Thrown at packages/adapter-auto/index.js:114

	} catch {
		const package_manager = detect_package_manager();
		const command = commands[package_manager](match.module, match.version);

		try {
			console.log(`Installing ${match.module}...`);

			execSync(command, {
				stdio: 'inherit',
				env: {
					...process.env,
					NODE_ENV: undefined
				}
			});

			resolved = resolve_peer(match.module);

			console.log(`Successfully installed ${match.module}.`);
			console.warn(
				`\nIf you plan to continue deploying to ${match.name}, consider replacing @sveltejs/adapter-auto with ${match.module}. This will give you faster installs and more control over deployment configuration.\n`
			);
		} catch (e) {
			throw new Error(
				`Could not install ${match.module}. Please install it yourself by adding it to your package.json's devDependencies and try building your project again.`,
				{ cause: e }
			);
		}
	}

	/** @type {{ default: () => Adapter }} */
	const module = await import(pathToFileURL(resolved).href);

	const adapter = module.default();

	return {
		...adapter,
		adapt: (builder) => {

View on GitHub (pinned to 03f1687fe6)

Solutions

  1. Install the detected adapter explicitly: `npm i -D @sveltejs/adapter-vercel` (or the module named in the message)
  2. Replace `@sveltejs/adapter-auto` with the concrete adapter in svelte.config.js
  3. Commit the adapter to devDependencies so CI doesn't rely on runtime installation

Example fix

// before
import adapter from '@sveltejs/adapter-auto';
// after
import adapter from '@sveltejs/adapter-vercel';
Defensive patterns

Strategy: validation

Validate before calling

// before build: ensure the concrete adapter is a devDependency
const pkg = require('./package.json');
if (pkg.devDependencies?.['@sveltejs/adapter-auto'] && !Object.keys(pkg.devDependencies).some(d => d.startsWith('@sveltejs/adapter-') && d !== '@sveltejs/adapter-auto')) {
  console.warn('adapter-auto will install a platform adapter at build time; pin it explicitly');
}

Prevention

When it happens

Trigger: Running `vite build` (adapt step) on a detected platform (via environment variables like VERCEL, NETLIFY, etc.) where the matching adapter module is not in node_modules, so `resolve_peer(match.module)` succeeds only because adapter-auto just installed it.

Common situations: CI environments where the platform adapter isn't committed to package.json; fresh clones deploying to Vercel/Netlify/Cloudflare relying on auto-detection; monorepos missing the peer dep.

Related errors


AI-assisted analysis of sveltejs/kit@03f1687fe6 (2026-09-02). Data as JSON: /api/errors/738914aed92befb9. Report an issue: GitHub.