tastejs/todomvc · critical · Error

Please specify the framework name to test. See fold

Error message

    Please specify the framework name to test.
    See folder names in the /examples.

      cypress open --env framework=react

    Or pass framework name through environment variable

      CYPRESS_framework=angular-dart/web cypress open
  

What it means

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.

Source

Thrown at cypress/e2e/spec.cy.js:20

// All of these tests are written to implement
// the official TodoMVC tests written for Selenium.
//
// The Cypress tests cover the exact same functionality,
// and match the same test names as TodoMVC.
// Please read our getting started guide
// https://on.cypress.io/introduction-to-cypress
//
// You can find the original TodoMVC tests here:
// https://github.com/tastejs/todomvc/blob/master/tests/test.js
// ***********************************************

import createTodoCommands from '../support/e2e'
import knownIssues from '../../tests/knownIssues'

/* global cy, Cypress */
const framework = Cypress.env('framework')
if (!framework) {
  throw new Error(
    `
    Please specify the framework name to test.
    See folder names in the /examples.

      cypress open --env framework=react

    Or pass framework name through environment variable

      CYPRESS_framework=angular-dart/web cypress open
  `
  )
}

// Apps whose runnable index.html is not at examples/<name>/index.html.
// Frameworks with a build step land their entry point in dist/ (or
// dist/browser/ for Angular's application builder); legacy examples
// occasionally use web/ or public/.
const frameworkFolders = {

View on GitHub (pinned to ff43b02e59)

Solutions

  1. 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).
  2. Export it as a Cypress-prefixed env var before running: `CYPRESS_framework=react cypress run`.
  3. Set it permanently in cypress.config.js under `e2e.env.framework` (or the `env` block) so it applies to every run.
  4. If running in CI, add the variable to the CI matrix/secret store and confirm it is exported into the shell that launches Cypress.

Example fix

// before
$ cypress run
  -> Error: Please specify the framework name to test.

// after (CLI)
$ cypress run --env framework=react

// after (cypress.config.js)
// e2e: { env: { framework: 'react' } }
Defensive patterns

Strategy: validation

Validate before calling

// Run before launching Cypress (e.g. in a precheck script or CI step).
const fs = require('fs')
const framework = process.env.CYPRESS_framework || require('./cypress.config.js').e2e?.env?.framework
if (!framework) {
  console.error('Missing required CYPRESS_framework. Example: CYPRESS_framework=react npm run test')
  process.exit(1)
}
const known = ['ampersand','angular','angular-dart','chaplin-brunch','duel','emberjs','javascript-es6','lit','polymer','preact','react','react-redux','svelte','vue']
if (!known.includes(framework)) {
  console.error(`Unknown framework "${framework}". Known: ${known.join(', ')}`)
  process.exit(1)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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_`.

Related errors


AI-assisted analysis of tastejs/todomvc@ff43b02e59 (2026-08-13). Data as JSON: /api/errors/53d77e52c62ac7a5. Report an issue: GitHub.