Test Runners
Jest, Vitest, Cypress, Playwright, RSpec - test failures decoded.
Fix test-runner errors in CI: Jest, Vitest, Mocha, Cypress, Playwright, Selenium, RSpec, and PHPUnit - config, timeouts, flakiness, and CI-only failures.
JS test runners
Jest, Vitest, Mocha config & failures.
"Cannot find module"Fix Jest "Cannot find module" in CI - a missing dependency, an unmapped path alias, or a case-sensitive
"Cannot use import statement"Fix Jest "SyntaxError: Cannot use import statement outside a module" in CI - an ESM-only dependency left
"duplicate ... naming collision"Fix Jest "jest-haste-map: Haste module naming collision" and "duplicate manual mock found" in CI - two files
"New snapshot was not written"Fix Jest "New snapshot was not written: The update flag must be explicitly passed" in CI - Jest refuses to
"TextEncoder is not defined"Fix Jest jsdom "ReferenceError: TextEncoder is not defined" in CI - a Web API jsdom does not implement.
"SecurityError: localStorage"Fix Jest jsdom "SecurityError: localStorage is not available for opaque origins" - set a testURL/jsdom URL or
setupFilesAfterEnv not loadingFix Jest "expect(...).toBeInTheDocument is not a function" or missing global hooks - a setupFilesAfterEnv
transformIgnorePatterns mis-setFix Jest still failing on an ESM dependency after editing transformIgnorePatterns - a wrong
"Cannot find name 'describe'"Fix ts-jest "Cannot find name 'describe'/'it'/'expect'" in CI - the Jest type definitions are not in scope.
vi.mock hoisting errorFix Vitest vi.mock hoisting errors - "Cannot access X before initialization" / "There are some problems
"Cannot find package happy-dom"Fix Vitest "Cannot find package happy-dom" or jsdom in CI - the DOM environment is an optional peer you
"failed to access its internal state"Fix Vitest "Vitest failed to access its internal state" in CI - two copies of Vitest loaded at once, a
"No test files found"Fix Vitest "No test files found, exiting with code 1" in CI - an include glob that matches nothing, the wrong
"No test files found"Fix Vitest "No test files found, exiting with code 1" in CI - an include glob that matches nothing, wrong
Vitest pool crashFix Vitest worker crashes and "Module did not self-register" / segfaults in CI by choosing the right pool -
"ReferenceError: describe is not defined"Fix Vitest "ReferenceError: describe is not defined" / "expect is not defined" in CI - enable globals in
"Cannot use import.meta"Fix "import.meta is not available" / "Cannot use import.meta outside a module" in tests - Jest CommonJS lacks
E2E & browser
Cypress, Playwright, Selenium.
"out of memory or has crashed"Fix Cypress "The Test Runner unexpectedly exited... browser ran out of memory or has crashed" in CI - disable
"Record Key ... not valid"Fix Cypress Cloud "Your Record Key is not valid" / "You passed the --record flag but did not provide a Record
"Webpack Compilation Error"Fix Cypress "Webpack Compilation Error" in CI - a spec or support file that fails to bundle: a bad import, a
"libnss3.so: cannot open shared object file"Fix Playwright "error while loading shared libraries: libnss3.so: cannot open shared object file" in CI - the
"chromium_headless_shell ... Executable doesn't exist"Fix Playwright "Executable doesn't exist at .../chromium_headless_shell" in CI - the cached browser path has
"Executable doesn't exist"Fix Playwright "browserType.launch: Executable doesn't exist" in CI - the browser binaries were never
"expect(locator).toBeVisible() ... timeout"Fix Playwright "Timed out 5000ms waiting for expect(locator).toBeVisible()" in CI - slow render, an element
"config.webServer" timed outFix Playwright "Timed out waiting 60000ms from config.webServer" in CI - the app under test was slow to boot
"Chrome failed to start: crashed"Fix Selenium "unknown error: Chrome failed to start: crashed (chrome not reachable)" in CI - headless Chrome
Other languages
RSpec, PHPUnit, and more.
"thresholds have been crossed"Fix k6 "some thresholds have been crossed" with exit code 99 in CI - a defined threshold failed, so k6
"Cannot start Chrome"Fix Karma "Cannot start Chrome" / "No binary for Chrome browser" in CI - use ChromeHeadless with --no-sandbox
"No binary for ChromeHeadless"Fix Karma "No binary for ChromeHeadless browser on your platform" in CI - Chrome not installed, CHROME_BIN
"locust: error: unrecognized arguments"Fix "locust: error: unrecognized arguments" in CI - a flag passed to Locust is misspelled, deprecated, or a
"WebSocket is not open: readyState 3 (CLOSED)"Fix the Node ws error "WebSocket is not open: readyState 3 (CLOSED)" in CI - a test called send() on a socket
Explore other topics
GitHub ActionsWorkflow, runner, and YAML errors - diagnosed and fixed.
Node.js & npmnpm, yarn, and pnpm failures in CI - solved.
DockerBuild, run, compose, and registry errors - explained.
Pythonpip, poetry, venv, and pytest failures - fixed.
Java & JVMMaven, Gradle, and JVM failures in CI - resolved.
GoGo build, module, and test failures - diagnosed.