Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

ENOENT means that a process tried to open a path that does not exist. It does not identify which path is wrong or why it is missing. Copy the complete error, including the path after “no such file or directory,” then identify the process and operation that produced it. A missing spec, fixture, generated download, Cypress executable, cache directory, and Linux shared library each require a different fix.

This decision tree covers Cypress projects run locally, in CI, and in containers. Defaults can vary by Cypress release and by your project configuration; the official Cypress documentation links below reflect the current guidance available in September 2026.

Start with the literal missing path

Do not begin by reinstalling Cypress or changing random folders. Save the full stack trace, the exact command, the working directory, and whether the failure happened during test discovery, inside a test, while launching Cypress, or while starting the browser. The path usually tells you which branch applies.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
What the path resembles Likely branch First check
cypress/e2e/...cy.js or another spec name Spec discovery or project-root mismatch Project directory, file name/case, and specPattern
cypress/fixtures/... or a report/output file Fixture or test-created file Writer path, reader path, timing, and fixture configuration
cypress/downloads, screenshots, or videos Generated asset path Resolved configuration and run cleanup behavior
A Cypress version directory, executable, or cache location Binary installation/cache Install hook, cache folder, and CI cache
lib... or another shared object marked “not found” Linux runtime dependency Binary smoke test and ldd output

If the path does not make the case clear, record your operating system, Cypress version, Node.js version, package manager, exact command, and local-versus-CI context. Also capture effective Cypress-related environment variables, redacting tokens and credentials.

Cypress spec file not found

When the missing path is a test file, verify all of the following before changing Cypress:

  • Run the command from the intended Cypress project folder, or explicitly select the project with your normal project option.
  • Confirm the file exists in that checkout and that every directory and character has the correct spelling and case. Case-sensitive Linux filesystems expose errors that may be invisible on a case-insensitive workstation.
  • Check the extension and the configured specPattern in your Cypress configuration. Cypress applies the supplied --spec value together with the configured pattern; an exact path outside the pattern can still be excluded.
  • For --spec, use a path relative to the project folder, as described in Cypress configuration.
  • In a monorepo, verify that the CI job’s working directory is the package containing cypress.config.js (or its TypeScript equivalent), not the repository root by accident.

For example, if the file is packages/shop/cypress/e2e/cart.cy.js, a job started in packages/shop should pass a project-relative value such as cypress/e2e/cart.cy.js. A job started one directory higher needs its project selection and pattern configured consistently; do not assume that a path valid in one working directory is valid in another.

Check what Cypress actually discovers

Open the Cypress runner and inspect the available Specs list, or run with the same project and pattern used by CI. If the file is not listed, the problem is discovery rather than a test assertion. Correct the pattern, location, or checkout before investigating application code. If it is listed but a script still reports ENOENT, classify the new path from the table above; a test may be trying to read a separate fixture or generated artifact.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cypress fixture or test-created file does not exist

Cypress uses cypress/fixtures by default. The folder can be changed with fixturesFolder or disabled, so inspect the effective configuration before assuming the default. Check exact spelling, case, extension, and whether the file is actually present inside the container or CI checkout.

Reading a fixture

Use a project-relative fixture name with the Cypress APIs and keep the reader’s path aligned with the configured folder. A file that exists on your laptop but is ignored, generated, or absent from the CI checkout will still produce ENOENT in CI.

Reading a file produced during the test

Verify the writer’s output directory and the reader’s path character by character. Then make sure the asynchronous write has completed before the assertion expects the file. Cypress documents that cy.readFile() rereads the file during assertion retries, so it can wait for a report or other file to appear or finish changing. That behavior is useful for a file produced by an application or task; it does not repair a permanently incorrect path.

Filesystem work that belongs in Node should run in a cy.task() implementation registered through setupNodeEvents, rather than relying on browser-side code to manipulate arbitrary paths. Have the task return the resolved path or a clear status while diagnosing, and remove sensitive path information from logs once fixed. See Cypress’s test-organization and file-access guidance.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Screenshot, download, or video path is missing

Cypress defaults downloads to cypress/downloads, screenshots to cypress/screenshots, and videos to cypress/videos. Your configuration can change each location. In cypress run, trashAssetsBeforeRuns defaults to true and clears contents within the configured download, screenshot, and video folders before a run.

That cleanup can make a script’s guessed path invalid. Screenshots and videos also mirror the unique portion of the spec directory structure, so the final nested path can change when the set of specs in a run changes. Do not infer a missing artifact merely from a hard-coded path.

Use the resolved event path

When another process needs an artifact, obtain the path from Cypress’s Node events rather than reconstructing it. The after:screenshot and after:spec events expose the resolved locations; log or pass that value to the next step. Check the active downloadsFolder, screenshotsFolder, and videosFolder settings in the configuration reference.

Cypress binary not found in cache

If ENOENT appears while Cypress itself is launching and the path names a version directory or executable, inspect installation and caching rather than test files. The Cypress npm package normally downloads a platform-specific binary during its installation hook. If a package-manager install was run with lifecycle scripts disabled, or if a CI cache contains only the npm package and not the binary, cypress run and cypress verify can fail before any spec starts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Check the install log for a skipped or failed Cypress install hook.
  2. Run the package manager’s install in a job where lifecycle scripts are permitted, or arrange a valid Cypress binary cache according to your package manager.
  3. Run npx cypress verify (or the equivalent command through your package manager) in the same environment and user context as the test job.
  4. Print Cypress’s cache path and list its contents in CI diagnostics. Do not print secrets or unrelated environment variables.
  5. Ensure the cache key includes the Cypress version, operating system, architecture, and relevant lockfile so a binary from another environment is not reused.

The official Cypress common-error guidance specifically distinguishes the CI “Cached Cypress Binary Could not be found” condition. Its CI guide cautions against caching node_modules directly as a substitute for a package manager’s cache; doing so can prevent Cypress from downloading its binary.

Custom cache and executable settings

CYPRESS_CACHE_FOLDER must point to a directory that exists when Cypress launches. Create it in the job or correct the environment variable. CYPRESS_RUN_BINARY must point to an already unzipped Cypress executable, not to a zip archive or its parent directory. Some unzip tools add a top-level cypress directory, so inspect the extracted tree and set the variable to the actual executable path. The details and supported forms are documented in Advanced installation in Cypress.

Cypress works locally but not in CI

Compare the two environments as a matrix, not as a single “works/doesn’t work” statement:

Dimension Local check CI check
Project root pwd and the directory containing the Cypress config Job working-directory setting and checkout path
Files Case and generated files present Checkout includes them; generation step ran before Cypress
Versions Node, Cypress package, lockfile Same versions and architecture
Environment Effective CYPRESS_* paths Variables, user, permissions, and container mounts
Binary Cache path contains the executable Cache restored for this OS/architecture and verified before tests
Host libraries Desktop libraries available Container image includes required Linux dependencies

Capture these values in a failing CI run, then remove the diagnostic output after the path issue is resolved. A different user, mounted workspace, or case-sensitive filesystem can turn a valid local relative path into ENOENT.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Linux runtime dependency is missing

When Cypress finds its executable but launch fails with a missing shared library, this is a host-runtime problem, not a spec or fixture problem. Cypress’s troubleshooting guidance recommends running the binary smoke test and inspecting dependencies with ldd. For example:

ldd /path/to/the/cypress/binary | grep "not found"

Every line marked not found identifies a library that the operating system cannot load. Install the matching packages for your Linux distribution, or use a Cypress Docker image that packages the required dependencies. Do not apply this branch when the missing path is an application file under your project. See Cypress troubleshooting for the smoke-test procedure and container guidance.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

A practical diagnostic decision tree

  1. Copy the complete error. Preserve the operation, path, stack, command, working directory, and phase of failure.
  2. Classify the path. Spec, fixture/generated file, Cypress asset folder, executable/cache, or shared library.
  3. Check the process’s viewpoint. Confirm project root, current user, container mount, and case-sensitive path spelling.
  4. Compare effective configuration. Inspect specPattern, fixturesFolder, asset folders, CYPRESS_CACHE_FOLDER, and CYPRESS_RUN_BINARY.
  5. Prove existence at the point of use. List the exact parent directory immediately before Cypress or your task reads it; for generated files, verify the writer completed.
  6. Apply the narrow fix. Correct one path, pattern, cache, install step, or host dependency at a time, then rerun the same command.

Prevention and reliability checklist

  • Keep the Cypress config and specs in the same project context used by CI.
  • Use project-relative --spec values and patterns that include the intended extensions.
  • Preserve filename case consistently across developer machines and repositories.
  • Have tasks return resolved output paths instead of making later steps guess nested screenshot or video locations.
  • Run dependency installation with the Cypress install hook enabled, then verify the binary in the CI image.
  • Cache through the package manager and key Cypress binary caches by version and platform.
  • Fail clearly when a required generated file was not produced, rather than obscuring the original writer error with a later ENOENT.

Or skip the browser setup

If your goal is simply to obtain a clean website screenshot rather than exercise Cypress, ScreenshotNeo provides a one-request API. It accepts consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Only clean shots are billed, while bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result in X-Page-Verdict and X-Billed headers. It also offers an MCP server with take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

Use the API documentation at screenshotneo.com/docs/ for all options, including full-page and selector capture, device presets, retina scale, PDF settings, custom CSS/JavaScript, waits, request blocking, headers, cookies, geolocation, caching, signed links, asynchronous jobs, bulk capture, and usage reporting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`ScreenshotNeo HTTP ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account to get an access key.

Frequently Asked Questions

What does ENOENT mean in a Cypress error?

It is the operating system’s indication that a process attempted to open a path that was not present at that moment. The missing path and the operation determine the fix.

Why does an exact –spec path still produce “spec file not found”?

Cypress intersects –spec with the configured specPattern, and the value is interpreted relative to the project folder. A path outside that pattern or project root is excluded.

Should I delete node_modules to fix a missing Cypress binary?

Not as a first step. Check the install hook, Cypress cache path, platform-specific cache contents, and run cypress verify in the same CI environment. Reinstall only after identifying an installation or cache failure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How can I tell a missing Linux library from a missing Cypress executable?

An executable/cache error names a Cypress binary or version directory. A runtime-dependency failure occurs after launch begins and identifies a shared library; ldd on the binary lists dependencies marked “not found.”

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.