{"record":{"id":"1e485aec676930e8","repo":"cypress-io/cypress","slug":"unexpected-framework-devserverconfig-as-any-fr","errorCode":null,"errorMessage":"Unexpected framework ${(devServerConfig as any).framework}, please visit https://on.cypress.io/frameworks to see a list of supported frameworks","messagePattern":"Unexpected framework (.+?), please visit https://on\\.cypress\\.io/frameworks to see a list of supported frameworks","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"npm/webpack-dev-server/src/devServer.ts","lineNumber":116,"sourceCode":"  if (devServerConfig.framework && isThirdPartyDefinition(devServerConfig.framework)) {\n    return defaultWebpackModules()\n  }\n\n  switch (devServerConfig.framework) {\n    case 'next':\n      return await nextHandler(devServerConfig)\n\n    case 'angular':\n      return await angularHandler(devServerConfig)\n\n    case 'react':\n    case 'vue':\n    case 'svelte':\n    case undefined:\n      return defaultWebpackModules()\n\n    default:\n      throw new Error(`Unexpected framework ${(devServerConfig as any).framework}, please visit https://on.cypress.io/frameworks to see a list of supported frameworks`)\n  }\n}\n\n/**\n * Synchronously create the webpack server instance, without starting.\n * Useful for testing\n *\n * @internal\n */\ndevServer.create = async function (devServerConfig: WebpackDevServerConfig) {\n  const { frameworkConfig, sourceWebpackModulesResult } = await getPreset(devServerConfig)\n\n  const { server, compiler } = await createWebpackDevServer({\n    devServerConfig,\n    frameworkConfig,\n    sourceWebpackModulesResult,\n  })\n","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/cypress-io/cypress/blob/0d85fdc91230885bca0a91df278312800a48b727/npm/webpack-dev-server/src/devServer.ts#L98-L134","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\ndevServer: { bundler: 'webpack', framework: 'ReAct' }\n// after\ndevServer: { bundler: 'webpack', framework: 'react' }\n// or for a community framework\ndevServer: { bundler: 'webpack', framework: 'cypress-ct-solid' }","handlingStrategy":"validation","validationCode":"const KNOWN = ['next','angular','react','vue','svelte']\nfunction assertFramework(f?: string) {\n  if (!f || KNOWN.includes(f) || f.startsWith('cypress-ct-') || /^@.+\\/cypress-ct-/.test(f)) return\n  throw new Error(`Unsupported framework '${f}'`)\n}","typeGuard":"const isKnownFramework = (f: string): boolean => ['next','angular','react','vue','svelte'].includes(f) || f.startsWith('cypress-ct-') || /^@.+\\/cypress-ct-/.test(f)","tryCatchPattern":null,"preventionTips":["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."],"tags":["webpack","dev-server","framework","config","validation"],"backgroundTag":null,"analyzedSha":"0d85fdc91230885bca0a91df278312800a48b727","analyzedAt":"2026-08-12T16:24:28.056Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}