Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
If Cypress or TypeScript cannot resolve @badeball/cypress-cucumber-preprocessor/steps, first confirm that the project has the maintained scoped package installed, then check TypeScript’s package-export resolution and the Cypress plugin setup. For TypeScript, "moduleResolution": "node16" is the usual fix; if your project cannot use it, map the package subpaths to its documented entry points.
Identify which “cannot find module” error you have
The same wording can point to different problems. The importing code, the tool reporting the error, and the exact module path help distinguish them:
TS2307in an editor or duringtscusually means TypeScript cannot resolve the package’s conditional exports or the package is missing from the installed dependencies.- An error at Cypress startup or while bundling a spec can mean the maintained plugin or its bundler integration is missing or misconfigured.
- A test that starts but reports no matching step definition is a step-file discovery problem. Installing another copy of the package will not correct a glob that does not match your files.
Use the corresponding checks below. The import for step definitions is provided by the scoped package @badeball/cypress-cucumber-preprocessor; the separate, unscoped cypress-cucumber-preprocessor package is obsolete according to the maintainers’ FAQ.
Free tools Windows power users keep installed
One-click scans. No signup required.
1. Install the maintained package and remove the obsolete import
From the project directory, install the scoped package as a development dependency:
#1 Best Overall
- KEYBOARD: The keyboard works for Windows with hot keys that enable easy access to Media, My Computer, Mute, Volume up/down, and Calculator
- EASY SETUP: Experience simple installation with the USB wired connection
- VERSATILE COMPATIBILITY: This keyboard is designed to work with multiple Windows versions, including Vista, 7, 8, 10 offering broad compatibility across devices.
- SLEEK DESIGN: The elegant black color of the wired keyboard complements your tech and decor, adding a stylish and cohesive look to any setup without sacrificing function.
- FULL-SIZED CONVENIENCE: The standard QWERTY layout of this keyboard set offers a familiar typing experience, ideal for both professional tasks and personal use.
npm install --save-dev @badeball/cypress-cucumber-preprocessor
Check package.json for that exact package name. Search your project for imports from cypress-cucumber-preprocessor and replace accidental references to the unscoped package with the maintained package’s documented entry points. Do not deliberately combine both packages in one project: their similarly named imports can make it unclear which package your configuration or step files are using.
If the package is already declared but the module still cannot be resolved, inspect whether it is actually present in node_modules and whether the install matches the lockfile. A declaration in package.json alone does not prove that the current installation is complete.
2. Fix TypeScript resolution for package subpaths
The preprocessor uses conditional package exports. The maintainers’ quick start says that depending on which package parts are used, TypeScript may need moduleResolution set to node16.
Rank #2
- Reliable Plug and Play: The USB receiver provides a reliable wireless connection up to 33 ft (1), so you can forget about drop-outs and delays and you can take it wherever you use your computer
- Type in Comfort: The design of this keyboard creates a comfortable typing experience thanks to the low-profile, quiet keys and standard layout with full-size F-keys, number pad, and arrow keys
- Durable and Resilient: This full-size wireless keyboard features a spill-resistant design (2), durable keys and sturdy tilt legs with adjustable height
- Long Battery Life: MK270 combo features a 36-month keyboard and 12-month mouse battery life (3), along with on/off switches allowing you to go months without the hassle of changing batteries
- Easy to Use: This wireless keyboard and mouse combo features 8 multimedia hotkeys for instant access to the Internet, email, play/pause, and volume so you can easily check out your favorite sites
Preferred fix: use node16 module resolution
In the Cypress project’s tsconfig.json, set the option under compilerOptions:
{
"compilerOptions": {
"moduleResolution": "node16"
}
}
If the file already has a compilerOptions object, add the property there rather than replacing the object or creating a second one. Preserve your other compiler settings. TypeScript’s node16 resolver understands conditional exports, allowing it to resolve the package’s exported subpaths in configurations where the older resolver does not.
Check the effective configuration if the error remains. A project can have more than one tsconfig, and the Cypress support or spec files may be checked using a different configuration from the application code. Put the setting in the configuration that actually includes the failing file, or in a shared base config that it extends.
Rank #3
- All-day Comfort: The design of this standard keyboard creates a comfortable typing experience thanks to the deep-profile keys and full-size standard layout with F-keys and number pad
- Easy to Set-up and Use: Set-up couldn't be easier, you simply plug in this corded keyboard via USB on your desktop or laptop and start using right away without any software installation
- Compatibility: This full-size keyboard is compatible with Windows 7, 8, 10 or later, plus it's a reliable and durable partner for your desk at home, or at work
- Spill-proof: This durable keyboard features a spill-resistant design (1), anti-fade keys and sturdy tilt legs with adjustable height, meaning this keyboard is built to last
- Plastic parts in K120 include 51% certified post-consumer recycled plastic*
Fallback: map subpaths when moduleResolution cannot change
If the project cannot move to node16 resolution, the maintainers document a paths workaround pointing at the package’s subpath entry points:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall{
"compilerOptions": {
"paths": {
"@badeball/cypress-cucumber-preprocessor/*": [
"./node_modules/@badeball/cypress-cucumber-preprocessor/dist/subpath-entrypoints/*"
]
}
}
}
Merge this mapping into any existing paths object; do not discard mappings used elsewhere in the project. The fallback is more configuration to maintain and points TypeScript at the installed package layout, so use it when changing module resolution is not practical rather than as the first choice. Confirm the installed package contains that documented entry-point directory if TypeScript still reports an unresolved path.
| Choice | When it fits | Trade-off |
|---|---|---|
moduleResolution: node16 |
You can update the TypeScript resolution setting for the Cypress project. | Uses TypeScript’s conditional-export-aware resolver; check compatibility with the project’s existing module settings and configuration. |
paths mapping |
The project cannot change to node16 resolution. |
Adds a package-layout-specific mapping that should be kept aligned with the installed package and any existing aliases. |
3. Configure Cypress to load feature files
Installing the preprocessor does not by itself tell Cypress to treat .feature files as specs. The Cypress config needs the preprocessor plugin, a compatible bundler integration, and a feature-file spec pattern. The maintainers’ quick start uses esbuild and recommends it when there is no special requirement for another bundler.
Rank #4
- 【Dreamy Rainbow Gaming Keyboard】K521 Gaming Keyboard Adopts a Different LED Backlight Design, Upgraded on the Traditional LED Backlight Effect, Making the Light More Penetrating, Giving You a More Dazzling Visual Effect, Making Your Gaming Process More Enjoyable
- 【One Touch Opens & Visual Feast】The K521 Red Dragon Keyboard has a One-Touch on/off Lighting Button for Added Convenience. It also has a Three-Position Adjustable Breathing Mode and a Four-Position Adjustable Brightness Lighting Mode
- 【Mechanical Feeling & Fast Tapping】The PC Keyboard Keys are Designed for Mechanical Feeling, Giving You a Better Feel During Use and the Ability to Trigger Keys Quickly, Allowing You to Win All Your Games
- 【19 Keys Anti-Ghosting Keyboard】Anti-Ghosting Ensures Every Button Can Be Triggered. This Allows You to Trigger Key Combinations In The Game Accurately, And Each Skill Can Be Accurately Released to Increase Your Winning Rate. Redragon K521 Will Be Your Perfect Partner
- 【12 Multimedia Combination Keys】The K521 Wired Gaming Keyboard is Equipped with 12 Multimedia Keys That Can Greatly Enhance Your Gaming/Office Efficiency and Make It More Convenient to Use
A TypeScript Cypress configuration using the documented esbuild approach has this shape:
import { defineConfig } from "cypress";
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import createEsbuildPlugin from "@badeball/cypress-cucumber-preprocessor/esbuild";
export default defineConfig({
e2e: {
specPattern: "**/*.feature",
async setupNodeEvents(on, config) {
await addCucumberPreprocessorPlugin(on, config);
on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin(config)],
})
);
return config;
},
},
});
Use the equivalent structure for your project if it already has a Cypress config: the important checks are that specPattern includes feature files, addCucumberPreprocessorPlugin is called during setupNodeEvents, the bundler is wired to the file-preprocessor event, and the modified config is returned. Keep any existing Cypress event handlers and merge this setup into them rather than replacing unrelated configuration.
The imports and setup above are the esbuild route. If your project already uses Browserify or Webpack, use the matching integration documented by the preprocessor rather than attaching an esbuild plugin to a different bundler. The practical choice depends on the build pipeline already in use, its TypeScript/ESM needs, and the configuration you are prepared to maintain; esbuild is the quick-start recommendation when there is no special constraint.
Best Value
- All-day Comfort: This USB keyboard creates a comfortable and familiar typing experience thanks to the deep-profile keys and standard full-size layout with all F-keys, number pad and arrow keys
- Built to Last: The spill-proof (2) design and durable print characters keep you on track for years to come despite any on-the-job mishaps; it’s a reliable partner for your desk at home, or at work
- Long-lasting Battery Life: A 24-month battery life (4) means you can go for 2 years without the hassle of changing batteries of your wireless full-size keyboard
- Simply plug the USB receiver into a USB port on your desktop, laptop or netbook computer and start using the keyboard right away without any software installation
- Simply Wireless: Forget about drop-outs and delays thanks to a strong, reliable wireless connection with up to 33 ft range (5); K270 is compatible with Windows 7, 8, 10 or later
4. Check where step definitions are discovered
Resolving the /steps package entry point and finding your own step-definition files are separate tasks. The maintainers state that step definitions are resolved through configurable search paths in the stepDefinitions property. The documented defaults cover matching files under cypress/e2e and cypress/support/step_definitions; see the step-definition documentation.
If a feature runs but a step is reported as undefined, check that your step file is in one of those locations and matches the default filename patterns. If your repository keeps step files elsewhere, explicitly configure stepDefinitions in .cypress-cucumber-preprocessorrc.json or in the preprocessor configuration in package.json. Make the glob match the actual paths and file extensions in your project; a directory mismatch is enough to leave valid definitions undiscovered.
5. Reinstall cleanly and restart the process that reported the error
- Save the corrected package and configuration files.
- If dependencies appear incomplete, reinstall from the committed lockfile using the package manager used by the project. For an npm project with a lockfile, run
npm cifrom the project root; it recreatesnode_modulesfrom that lockfile. - Restart Cypress so it reloads the config and plugin setup.
- In your editor, restart the TypeScript server so it rereads the updated tsconfig and package exports. In VS Code, use the Command Palette command TypeScript: Restart TS Server.
- Run the feature spec again. If the error changes from module resolution to an undefined step, the import issue is resolved and the remaining task is to correct step-definition discovery.
Common failure patterns and fixes
| Symptom | Likely cause | What to check |
|---|---|---|
TS2307 remains in the editor after install |
TypeScript is using a resolver that does not recognize the package’s conditional exports, or the wrong tsconfig applies to the file. | Set moduleResolution to node16, or use the documented paths fallback; verify the config includes the failing file and restart the TS server. |
| Cypress reports it cannot find the package at startup | The scoped dependency is missing, the install is incomplete, or code still imports the unscoped package. | Verify the dependency and lockfile installation, then search for and remove stale unscoped imports. |
| Feature files are not listed as specs | The Cypress spec pattern does not include feature files. | Set e2e.specPattern to **/*.feature or to an equivalent pattern that matches the project’s feature-file locations. |
| Feature runs, but steps are undefined | The step-definition glob does not match where the files live. | Use the default covered locations or configure stepDefinitions for the repository’s actual layout. |
| Bundling fails after the plugin is installed | The bundler entry point and the configured bundler do not correspond, or the plugin setup was not added to setupNodeEvents. |
Follow one supported integration consistently, await the plugin setup, register the file preprocessor, and return the config. |
Or skip the browser setup
If your goal is to capture a page screenshot rather than run a Cypress Cucumber test, ScreenshotNeo is a screenshot API with an MCP server for AI agents. One GET request can return an image or PDF; this example saves a WebP response. See the ScreenshotNeo API documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://stripe.com
-o shot.webp
Before capture, ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Is @badeball/cypress-cucumber-preprocessor/steps a separate package to install?
No. It is a package subpath; install the scoped @badeball/cypress-cucumber-preprocessor package.
Does fixing TS2307 guarantee Cypress will find my steps?
No. TypeScript module resolution and the preprocessor’s stepDefinitions search paths are separate issues.
Quick Recap
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.

