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

Run Cypress with DEBUG=cypress:server:preprocessor,cypress:webpack,cypress:webpack:stats to expose the preprocessing lifecycle, Webpack messages, and bundle statistics. The most targeted setting is DEBUG=cypress:webpack:stats; it reports diagnostic categories such as compilation timings, chunks, and sizes. These variables help only when the failing process is the @cypress/webpack-preprocessor. Component tests may use a Vite or Webpack dev server, and an application build started outside Cypress has its own logs.

Start with the right debug command

Use the command that matches your shell and the test mode you are running.

macOS and Linux

DEBUG=cypress:server:preprocessor,cypress:webpack,cypress:webpack:stats npx cypress run

To focus only on Webpack bundle output:

DEBUG=cypress:webpack:stats npx cypress run

For broader preprocessor messages without bundle statistics:

DEBUG=cypress:webpack npx cypress run

Cypress accepts comma-separated debug namespaces, so combining them gives you the broadest view of a default Webpack-preprocessed end-to-end run.

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.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Windows Command Prompt

set DEBUG=cypress:server:preprocessor,cypress:webpack,cypress:webpack:stats&& npx cypress run

Windows PowerShell

$env:DEBUG="cypress:server:preprocessor,cypress:webpack,cypress:webpack:stats"; npx cypress run

Run the command from the project directory so Cypress uses the same configuration, dependencies, and lockfile as your normal test command. Save the terminal output to a file when a CI log is difficult to search:

DEBUG=cypress:server:preprocessor,cypress:webpack,cypress:webpack:stats npx cypress run 2>cypress-debug.log | tee cypress-output.log

What each namespace reveals

Namespace Scope Useful output
cypress:webpack:stats Webpack compilation statistics from @cypress/webpack-preprocessor Bundle timings, chunks, and sizes
cypress:webpack Preprocessor-level Webpack diagnostics Broader module and compilation messages
cypress:server:preprocessor Cypress’s file-preprocessing lifecycle Which files are sent for preprocessing and when that work starts or finishes

Statistics are not a substitute for the first actual error. A large chunk or a long timing can explain performance, but it does not identify a missing import by itself. Read the first meaningful error naming a file, loader, module, or source position; later messages are often consequences.

Identify which build is failing

The message “We found an error preparing your test file” means Cypress could not compile or bundle a spec or support file. Typical causes documented by Cypress include a missing file, invalid syntax in the file or one of its dependencies, and a missing dependency.

End-to-end spec or support preprocessing

In end-to-end mode, Cypress packages a default Webpack preprocessor when you have not supplied a custom file:preprocessor. That path handles common TypeScript and JSX cases through its bundled configuration. The debug namespaces above are intended for this process.

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

Component testing

Component tests are compiled by the configured dev server. Depending on your project, that server is Vite or Webpack. A component-test alias or loader must therefore be fixed in that dev-server configuration, not assumed to be controlled by the default end-to-end preprocessor.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

An application build outside Cypress

If your test starts a separately managed application build, its compiler output comes from that build command. Cypress’s preprocessor debug variables will not make an unrelated application bundler verbose. Run the application’s own build or development command with its supported diagnostics as well.

A reliable diagnostic sequence

  1. Reproduce one failing file. Run the smallest spec or test group that still fails. This reduces unrelated bundle statistics and makes the first error easier to locate.
  2. Turn on all three namespaces. Start with cypress:server:preprocessor,cypress:webpack,cypress:webpack:stats. If the output is too large, remove namespaces one at a time, retaining the one that shows the missing module or loader.
  3. Locate the first root error. Note the exact path and imported module. Check that the file exists with the same capitalization used by the import, that the package is installed, and that the syntax is supported by the active loader.
  4. Inspect imported files. The reported spec can be valid while an imported helper, fixture, TypeScript file, or package contains the syntax error.
  5. Confirm the active preprocessor. Review setupNodeEvents for a custom on('file:preprocessor', ...) registration. A custom implementation may use different debug namespaces and options.
  6. Check aliases. Test the exact import path from the error, not merely a relative equivalent. Configure aliases in Webpack when needed.
  7. Enable source maps. Add inline source maps so Cypress can show source-level locations and code frames.
  8. Re-run without unrelated changes. Once the first error is fixed, run the same command again; a second error may have been hidden behind the first compilation failure.

Fix path aliases explicitly

The default Webpack preprocessor does not automatically inherit compilerOptions.paths from tsconfig.json or _moduleAliases from package.json. An import such as @/support/commands can therefore fail even though an editor resolves it.

Webpack alias configuration

Register a custom preprocessor and add the alias to Webpack’s resolve.alias. A typical shape is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const webpack = require('@cypress/webpack-preprocessor')
const path = require('path')

module.exports = {
  e2e: {
    setupNodeEvents(on) {
      on('file:preprocessor', webpack({
        webpackOptions: {
          resolve: {
            alias: {
              '@': path.resolve(__dirname, 'src')
            }
          }
        }
      }))
    }
  }
}

Merge this with your existing loader and resolve settings rather than replacing them blindly. The directory must match the alias target used by your project.

Using TypeScript path mappings

When your project maintains aliases in tsconfig.json, use a Webpack path-resolution plugin such as tsconfig-paths-webpack-plugin where appropriate, or duplicate the required mappings in resolve.alias. The important point is that the bundler, not only the TypeScript editor, must know the mapping.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Make source locations readable with inline maps

Webpack compilation statistics and source maps solve different problems. Statistics show bundle-level information; source maps let Cypress map generated code back to the original TypeScript, JavaScript, or JSX and display code frames. For the Webpack preprocessor, Cypress documents:

module.exports = {
  devtool: 'inline-source-map'
}

Place this in the Webpack options used by the Cypress preprocessor. Without inline source maps, Cypress says code frames will not appear. Source maps can make a stack trace actionable, but they do not add missing-module details or replace the debug namespaces.

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

Common errors and targeted fixes

“Module not found: Can’t resolve …”

Verify the import spelling and case, confirm the target exists, and install the named dependency in the package that runs Cypress. If the path uses an alias, configure that alias in the active bundler.

“You may need an appropriate loader”

The file extension is reaching Webpack without a matching loader. Check whether the failing file is TypeScript, JSX, CSS, or another asset type, then add or restore the corresponding rule in the custom preprocessor configuration. Do not add a loader to a component dev server configuration when the error came from end-to-end preprocessing.

Unexpected token or syntax error

Read the file and line named in the first error, then inspect its imports. A dependency may use syntax your current loader or target does not transform. Confirm that the file is included by the intended rule and that the syntax is valid for the configured parser.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Alias works in the editor but fails in Cypress

Editor resolution is independent of Webpack resolution. Add resolve.alias or a suitable TypeScript-path plugin to the Cypress bundler, then rerun with DEBUG=cypress:webpack to verify the custom preprocessor is active.

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

No Webpack debug output appears

The failing process may not be @cypress/webpack-preprocessor, the variable may not have been exported in the shell, or a wrapper command may be clearing the environment. Print the variable in the same shell, run npx cypress run directly, and check whether component testing uses Vite or another dev server.

The log is huge or slow

Run one spec, start with cypress:webpack:stats, and add the other namespaces only when needed. Statistics can expose expensive bundles; they do not require you to keep verbose logging enabled in every CI run.

Custom preprocessor configuration checklist

  • Register the package through on('file:preprocessor', ...) in setupNodeEvents.
  • Pass Webpack options through the preprocessor configuration rather than editing files Cypress does not use.
  • Keep the loader rules required by your specs and support files.
  • Define aliases in Webpack or connect Webpack to your TypeScript path mappings.
  • Set devtool: 'inline-source-map' when code frames are needed.
  • Retest both a minimal spec and a representative spec after changing the configuration.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance and CI practice

Use verbose namespaces interactively or for a single failing CI job. Keep normal runs quieter, but preserve the command in your team troubleshooting notes. Bundle statistics can reveal whether a failure is accompanied by unusually long compilation or oversized chunks; they are diagnostic context, not a pass/fail threshold.

For reproducibility, collect the Cypress mode, active preprocessor, Node package lock state, exact failing file, first error, and relevant alias or loader configuration. This prevents a generic “Webpack failed” report from losing the details needed to fix it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Or skip the browser setup

If what you actually need is a rendered image of a URL rather than Cypress’s test-file compilation, ScreenshotNeo provides a direct screenshot API. Its cleanup steps accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be disabled. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. An MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

One-call cURL example (see the ScreenshotNeo API documentation):

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)
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}`);

The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

Frequently asked questions

Do debug statistics fix a compilation error?

No. They expose evidence about the compilation; you still correct the missing file, dependency, syntax, alias, or loader that caused the failure.

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

Should I enable every namespace permanently?

No. Enable the combined command while diagnosing, then narrow logging for routine runs and CI output.

Why do I see a source line but no code frame?

Configure Webpack with devtool: 'inline-source-map' in the preprocessor options used by Cypress.

Are component-test errors covered by these variables?

Only if the component setup actually uses the Webpack preprocessor. Otherwise inspect the configured Vite or Webpack dev-server diagnostics.

Frequently Asked Questions

Can I combine Cypress debug namespaces?

Yes. Separate namespaces with commas, for example DEBUG=cypress:server:preprocessor,cypress:webpack,cypress:webpack:stats.

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.

What should I capture for a bug report?

Include the Cypress mode, active preprocessor, exact command, first compilation error, named file or module, and the relevant alias or loader configuration.

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.