cypress-io/cypress · error · Error
Unexpected framework ${(devServerConfig as any).framework},
Error message
Unexpected framework ${(devServerConfig as any).framework}, please visit https://on.cypress.io/frameworks to see a list of supported frameworks What it means
Thrown by the webpack-dev-server getPreset switch when devServerConfig.framework is a string that is not one of the recognized cases. Recognized values are: 'next', 'angular', 'react', 'vue', 'svelte', undefined, plus any third-party name matching the cypress-ct-* / @scope/cypress-ct-* prefixes. Any other explicit string hits the default branch and throws, directing you to the supported-frameworks docs.
Source
Thrown at npm/webpack-dev-server/src/devServer.ts:116
if (devServerConfig.framework && isThirdPartyDefinition(devServerConfig.framework)) {
return defaultWebpackModules()
}
switch (devServerConfig.framework) {
case 'next':
return await nextHandler(devServerConfig)
case 'angular':
return await angularHandler(devServerConfig)
case 'react':
case 'vue':
case 'svelte':
case undefined:
return defaultWebpackModules()
default:
throw new Error(`Unexpected framework ${(devServerConfig as any).framework}, please visit https://on.cypress.io/frameworks to see a list of supported frameworks`)
}
}
/**
* Synchronously create the webpack server instance, without starting.
* Useful for testing
*
* @internal
*/
devServer.create = async function (devServerConfig: WebpackDevServerConfig) {
const { frameworkConfig, sourceWebpackModulesResult } = await getPreset(devServerConfig)
const { server, compiler } = await createWebpackDevServer({
devServerConfig,
frameworkConfig,
sourceWebpackModulesResult,
})
View on GitHub (pinned to 0d85fdc912)
Solutions
- Use one of the recognized framework values: 'react', 'vue', 'svelte', 'angular', 'next', or omit framework (undefined falls through to default webpack modules).
- For an unsupported framework, install/author a third-party preset whose name starts with `cypress-ct-` (or `@scope/cypress-ct-`) so isThirdPartyDefinition matches and it uses default webpack modules.
- Check the spelling and casing of the framework string against https://on.cypress.io/frameworks.
- Remove the framework key entirely if you want the default React/Vue/Svelte webpack handling.
Example fix
// before
devServer: { bundler: 'webpack', framework: 'ReAct' }
// after
devServer: { bundler: 'webpack', framework: 'react' }
// or for a community framework
devServer: { bundler: 'webpack', framework: 'cypress-ct-solid' } Defensive patterns
Strategy: validation
Validate before calling
const KNOWN = ['next','angular','react','vue','svelte']
function assertFramework(f?: string) {
if (!f || KNOWN.includes(f) || f.startsWith('cypress-ct-') || /^@.+\/cypress-ct-/.test(f)) return
throw new Error(`Unsupported framework '${f}'`)
} Type guard
const isKnownFramework = (f: string): boolean => ['next','angular','react','vue','svelte'].includes(f) || f.startsWith('cypress-ct-') || /^@.+\/cypress-ct-/.test(f) Prevention
- Use one of the documented framework values or omit the key.
- For community frameworks, name your preset with the cypress-ct-* prefix.
- Validate the framework string in your cypress.config.ts at startup.
When it happens
Trigger: Configuring `devServer: { bundler: 'webpack', framework: '<unknown>' }` where <unknown> is not next/angular/react/vue/svelte/undefined and does not match the third-party cypress-ct-* prefix pattern. The switch has no case for it, so default throws.
Common situations: A typo in the framework name (`'ReAct'`, `'vue3'`, `'nuxt'` instead of 'next'), passing a framework Cypress's webpack dev server does not have a built-in preset for (e.g. 'solid', 'lit' without the cypress-ct-* prefix), or leaving a stale framework value after migrating.
Related errors
- Missing vite dev server port.
- Your component devServer config for vite is missing a requir
- ESM plugin config value '${name}' must be an array of string
- No tsconfig.json found. ts-loader needs a tsconfig.json file
- Tests cannot run without a reference to Cypress!
AI-assisted analysis of cypress-io/cypress@0d85fdc912 (2026-08-12).
Data as JSON: /api/errors/1e485aec676930e8.
Report an issue: GitHub.