{"record":{"id":"1986627a4402e163","repo":"vitest-dev/vitest","slug":"unsupported-framework-framework","errorCode":null,"errorMessage":"Unsupported framework: ${framework}","messagePattern":"Unsupported framework: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vitest/src/create/browser/creator.ts","lineNumber":114,"sourceCode":"      return null\n    case 'vue':\n      return 'vitest-browser-vue'\n    case 'svelte':\n      return 'vitest-browser-svelte'\n    case 'react':\n      return 'vitest-browser-react'\n    case 'lit':\n      return 'vitest-browser-lit'\n    case 'preact':\n      return 'vitest-browser-preact'\n    case 'solid':\n      return '@solidjs/testing-library'\n    case 'marko':\n      return '@marko/testing-library'\n    case 'qwik':\n      return 'vitest-browser-qwik'\n  }\n  throw new Error(`Unsupported framework: ${framework}`)\n}\n\nfunction getFrameworkPluginPackage(framework: string) {\n  switch (framework) {\n    case 'vue':\n      return '@vitejs/plugin-vue'\n    case 'svelte':\n      return '@sveltejs/vite-plugin-svelte'\n    case 'react':\n      return '@vitejs/plugin-react'\n    case 'preact':\n      return '@preact/preset-vite'\n    case 'solid':\n      return 'vite-plugin-solid'\n    case 'marko':\n      return '@marko/vite'\n    case 'qwik':\n      return '@builder.io/qwik/optimizer'","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/vitest-dev/vitest/blob/1fa9837ec26533512fdcad8baebf249771bd340a/packages/vitest/src/create/browser/creator.ts#L96-L132","documentation":"The `vitest-browser` project creator CLI (packages/vitest/src/create/browser/creator.ts) scaffolds a browser component-testing project for a known UI framework. getFrameworkTestPackage maps the framework name to its testing-library/adapter package. An unrecognized framework string falls through the switch to this error.","triggerScenarios":"Passing a framework name not in the supported set (vue, svelte, react, lit, preact, solid, marko, qwik, vanilla) to the browser project creator — e.g. a typo like 'Reat' or an unsupported framework like 'angular'.","commonSituations":"Typo in the framework argument; using a framework Vitest's browser creator doesn't yet support; outdated Vitest version that predates a newly added framework.","solutions":["Use one of the supported framework names: vue, svelte, react, lit, preact, solid, marko, qwik, or vanilla.","Check for typos and case sensitivity in the framework argument.","Upgrade Vitest — newer versions may add support for your framework."],"exampleFix":"// before:\nnpx vitest-browser create --framework angular\n\n// after — use a supported framework or vanilla:\nnpx vitest-browser create --framework vanilla","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['vue','svelte','react','lit','preact','solid','marko','qwik','vanilla']\nif (!SUPPORTED.includes(framework)) {\n  throw new Error(`Supported frameworks: ${SUPPORTED.join(', ')}`)\n}","typeGuard":"function isSupportedFramework(f: string): f is 'vue'|'svelte'|'react'|'lit'|'preact'|'solid'|'marko'|'qwik'|'vanilla' {\n  return ['vue','svelte','react','lit','preact','solid','marko','qwik','vanilla'].includes(f)\n}","tryCatchPattern":null,"preventionTips":["Check supported framework names in the CLI help before passing --framework.","Keep Vitest updated for newly added framework support."],"tags":["cli","browser","scaffolding","framework"],"backgroundTag":null,"analyzedSha":"1fa9837ec26533512fdcad8baebf249771bd340a","analyzedAt":"2026-08-11T16:11:39.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}