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

  1. Use one of the recognized framework values: 'react', 'vue', 'svelte', 'angular', 'next', or omit framework (undefined falls through to default webpack modules).
  2. 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.
  3. Check the spelling and casing of the framework string against https://on.cypress.io/frameworks.
  4. 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

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


AI-assisted analysis of cypress-io/cypress@0d85fdc912 (2026-08-12). Data as JSON: /api/errors/1e485aec676930e8. Report an issue: GitHub.