canirequire › Dual (CommonJS + ESM) › cypress
Is cypress ESM-only? Can you require() it?
Cypress is a next generation front end testing tool built for the modern web
Latest version 16.0.0, published Sep 1, 2026. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
cypress publishes both a CommonJS entry and a native ESM entry (ESM added in 10.0.0). require("cypress") and import "cypress" both work on every supported Node.js version and in Bun.
Does cypress@16.0.0 actually load? Runtime test results
Runtime probe pending for this version. The values below are what package.json declares; they are refreshed once the probe runs.
| Runtime | require("cypress") | import "cypress" |
|---|---|---|
| Node.js 18 | ✓ expected | ✓ expected |
| Node.js 20 | ✓ expected | ✓ expected |
| Node.js 22 | ✓ expected | ✓ expected |
| Node.js 24 | ✓ expected | ✓ expected |
| Node.js 26 | ✓ expected | ✓ expected |
| Bun 1.4 | pending | pending |
Install failed in our sandbox: PROBE_TIMEOUT The rows above show what package.json declares.
How to import cypress
ES modules (import)
import cypress from "cypress";CommonJS (require)
const cypress = require("cypress");Module format by version
Derived from the type, main and exports fields of every stable release on npm (281 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 13.13.3 – 16.0.0 | Dual (CommonJS + ESM) | Aug 14, 2024 |
Frequently asked
Is cypress ESM-only?
cypress@16.0.0 ships CommonJS and ESM builds. cypress publishes both a CommonJS entry and a native ESM entry (ESM added in 10.0.0). require("cypress") and import "cypress" both work on every supported Node.js version and in Bun.
Can I require cypress?
Yes. cypress ships a CommonJS entry, so require("cypress") works on every Node.js version, alongside the native ESM entry for import.
Does cypress ship TypeScript types?
Yes. cypress bundles its own type declarations; no @types package is needed.
Links
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
Similar popularity
- eslint-plugin-unicorn 74.0.0ESM-only
- react-test-renderer 19.2.8CommonJS
- babel-runtime 6.26.0CommonJS
- http-server 14.1.1CommonJS
- lit 3.3.3ESM-only
- babel-core 6.26.3CommonJS
- esm 3.2.25CommonJS
- less-loader 13.0.0Dual