{"record":{"id":"53d77e52c62ac7a5","repo":"tastejs/todomvc","slug":"please-specify-the-framework-name-to-test","errorCode":null,"errorMessage":"\n    Please specify the framework name to test.\n    See folder names in the /examples.\n\n      cypress open --env framework=react\n\n    Or pass framework name through environment variable\n\n      CYPRESS_framework=angular-dart/web cypress open\n  ","messagePattern":"\n    Please specify the framework name to test\\.\n    See folder names in the /examples\\.\n\n      cypress open --env framework=react\n\n    Or pass framework name through environment variable\n\n      CYPRESS_framework=angular-dart/web cypress open\n  ","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"cypress/e2e/spec.cy.js","lineNumber":20,"sourceCode":"// All of these tests are written to implement\n// the official TodoMVC tests written for Selenium.\n//\n// The Cypress tests cover the exact same functionality,\n// and match the same test names as TodoMVC.\n// Please read our getting started guide\n// https://on.cypress.io/introduction-to-cypress\n//\n// You can find the original TodoMVC tests here:\n// https://github.com/tastejs/todomvc/blob/master/tests/test.js\n// ***********************************************\n\nimport createTodoCommands from '../support/e2e'\nimport knownIssues from '../../tests/knownIssues'\n\n/* global cy, Cypress */\nconst framework = Cypress.env('framework')\nif (!framework) {\n  throw new Error(\n    `\n    Please specify the framework name to test.\n    See folder names in the /examples.\n\n      cypress open --env framework=react\n\n    Or pass framework name through environment variable\n\n      CYPRESS_framework=angular-dart/web cypress open\n  `\n  )\n}\n\n// Apps whose runnable index.html is not at examples/<name>/index.html.\n// Frameworks with a build step land their entry point in dist/ (or\n// dist/browser/ for Angular's application builder); legacy examples\n// occasionally use web/ or public/.\nconst frameworkFolders = {","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/tastejs/todomvc/blob/ff43b02e59dfa604386bb382034b2cd07c2bcd8a/cypress/e2e/spec.cy.js#L2-L38","documentation":"This is a required-environment-variable guard thrown at module-load time (cypress/e2e/spec.cy.js:20). The suite is designed to run against exactly one TodoMVC example app, chosen by Cypress.env('framework'); that value selects the example folder (see frameworkFolders at line 38) and drives every per-framework skip/known-issue lookup. Without it the spec cannot know which app to load, so it aborts before registering any tests. The error message is the only onboarding hint the file gives.","triggerScenarios":"Running `cypress open` or `cypress run` with neither `--env framework=<name>` on the CLI nor a `CYPRESS_framework` environment variable set. Also triggered when the value is set to an empty string, since the guard is a plain falsy check on `Cypress.env('framework')` at line 18-19.","commonSituations":"Fresh clone where the contributor skipped the README; CI pipelines that pass other env vars but forget `framework`; switching between `cypress open` (which may have remembered a value in the GUI) and headless `cypress run`; env-var name casing typos such as `CYPRESS_Framework` (Cypress lowercases the prefix but the suffix is case-sensitive on some shells); a wrapper script that exports `framework` as a shell var but never prefixes it with `CYPRESS_`.","solutions":["Pass it on the CLI: `cypress open --env framework=react` (use a key from the frameworkFolders map at line 38, e.g. react, angular, vue, lit, polymer).","Export it as a Cypress-prefixed env var before running: `CYPRESS_framework=react cypress run`.","Set it permanently in cypress.config.js under `e2e.env.framework` (or the `env` block) so it applies to every run.","If running in CI, add the variable to the CI matrix/secret store and confirm it is exported into the shell that launches Cypress."],"exampleFix":"// before\n$ cypress run\n  -> Error: Please specify the framework name to test.\n\n// after (CLI)\n$ cypress run --env framework=react\n\n// after (cypress.config.js)\n// e2e: { env: { framework: 'react' } }","handlingStrategy":"validation","validationCode":"// Run before launching Cypress (e.g. in a precheck script or CI step).\nconst fs = require('fs')\nconst framework = process.env.CYPRESS_framework || require('./cypress.config.js').e2e?.env?.framework\nif (!framework) {\n  console.error('Missing required CYPRESS_framework. Example: CYPRESS_framework=react npm run test')\n  process.exit(1)\n}\nconst known = ['ampersand','angular','angular-dart','chaplin-brunch','duel','emberjs','javascript-es6','lit','polymer','preact','react','react-redux','svelte','vue']\nif (!known.includes(framework)) {\n  console.error(`Unknown framework \"${framework}\". Known: ${known.join(', ')}`)\n  process.exit(1)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set `e2e.env.framework` in cypress.config.js so local runs always have a default.","Document the required env var in the README next to the run command, not only inside the error string.","In CI, fail the job early with a dedicated check step rather than letting Cypress load and throw.","Validate the value against the frameworkFolders keys (line 38) so a typo like 'React' fails loudly before the run."],"tags":["cypress","configuration","environment-variable","startup-guard"],"backgroundTag":null,"analyzedSha":"ff43b02e59dfa604386bb382034b2cd07c2bcd8a","analyzedAt":"2026-08-13T10:00:20.798Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}