vitejs/vite · error · Error
currently full bundle mode is only available for client…
Error message
currently full bundle mode is only available for client environment
What it means
BundledDev (the experimental full-bundle dev server, environment.isBundled or config.experimental.bundledDev) is constructed with a DevEnvironment. Its constructor asserts environment.name === 'client' because the bundled dev pipeline is currently implemented only for the client environment. Any other environment name throws.
Solutions
- Keep bundled dev enabled only for the environment named 'client'.
- For SSR/custom environments, leave isBundled unset (they use the normal deps-optimizer pipeline).
- If you renamed the client environment, restore name: 'client' or restructure config so bundled dev applies to the client env only.
- Track Vite releases for when bundled dev expands to other environments.
Example fix
// before
environments: { ssr: { isBundled: true } }
// after
environments: { client: { isBundled: true } }
// or leave ssr without isBundled Defensive patterns
Strategy: validation
Validate before calling
function assertBundledClientOnly(envName) {
if (envName !== 'client') throw new Error('BundledDev only supports the client environment')
}
assertBundledClientOnly(env.name) Type guard
function isClientEnvironment(env): boolean {
return env.name === 'client'
} Prevention
- Enable isBundled only on the client environment.
- Keep SSR/RTE environments on the default pipeline.
- Track Vite changelog for expanded bundled-dev support.
When it happens
Trigger: Enabling bundled dev for a non-client environment — e.g. marking a custom SSR or RTE environment with isBundled: true, or the constructor receiving an environment named 'ssr'/'rte'/custom. The throw fires at BundledDev construction time inside DevEnvironment.
Common situations: Adopting environments-based config and setting isBundled on an SSR environment expecting bundle dev there; or a misnamed client environment (name not exactly 'client').
Related errors
- Environment " " is not defined in the config.
- Environment " " is not defined in the config.
- multiple output options are not supported in dev mode
- Required environments configuration were stripped out in…
- client ID conflict detected. Please restart the dev server.
AI-assisted analysis of vitejs/vite@b4d66fee14 (2026-08-11).
Data as JSON: /api/errors/c78148c767dca92b.
Report an issue: GitHub.
Appendix: source
Thrown at packages/vite/src/node/server/bundledDev.ts:93
private reloadNeededClientIds = new Set<string>()
private debouncedReloadNeededFlush = debounce(20, () => {
if (this.lastBuildError || this.reloadNeededClientIds.size === 0) return
for (const clientId of this.reloadNeededClientIds) {
this.clients.get(clientId)?.send({ type: 'full-reload', path: '*' })
}
this.reloadNeededClientIds.clear()
this.environment.logger.info(colors.green(`page reload`), {
timestamp: true,
})
})
private lastBuildError: Error | null = null
memoryFiles: MemoryFiles = new MemoryFiles()
constructor(private environment: DevEnvironment) {
if (environment.name !== 'client') {
throw new Error(
'currently full bundle mode is only available for client environment',
)
}
}
private get devEngine(): DevEngine {
if (!this._devEngine) {
throw new Error(`dev engine was not yet initialized`)
}
return this._devEngine
}
private pendingPayloadFilenames = new Set<string>()
get hasBuildOutput(): boolean {
return (
this.memoryFiles.size > 1 ||
(this.memoryFiles.size === 1 &&View on GitHub (pinned to b4d66fee14)