canirequire

canirequire › ESM-only › jest-watch-typeahead

Is jest-watch-typeahead ESM-only? Can you require() it?

Jest plugin for filtering by filename or test name

Last verified Sep 9, 2026 against jest-watch-typeahead@3.0.1. Markdown · JSON

ESM-only ESM-only since 1.0.0 — last CommonJS version is 0.6.5

jest-watch-typeahead dropped its CommonJS build in 1.0.0 (September 2021). The last version with a plain require()-able CommonJS entry is 0.6.5, published Sep 28, 2021; it declares support for Node.js >=10.

require("jest-watch-typeahead") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. On Node.js 18, which has no require(esm), require("jest-watch-typeahead") fails with ERR_REQUIRE_ESM.

What to do

  1. require("jest-watch-typeahead") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it.
  2. From a CommonJS file, use a dynamic import inside an async function: const jestWatchTypeahead = await import("jest-watch-typeahead"). That works on every Node.js version the package supports (>=18.0.0).
  3. If you need a synchronous require() or run Node.js 18: npm install jest-watch-typeahead@0.6.5, the last CommonJS release (published Sep 28, 2021); it declares Node.js >=10.
  4. TypeScript: no types are available for jest-watch-typeahead; declare the module yourself if you need them.
Latest
3.0.1 (Jun 19, 2025)
Module format
ESM-only
Last CommonJS version
0.6.5
ESM-only since
1.0.0 (Sep 29, 2021)
TypeScript types
None
Node engines
>=18.0.0
Weekly downloads
7.7M
License
MIT

Does jest-watch-typeahead@3.0.1 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("jest-watch-typeahead") from a CommonJS file and import "jest-watch-typeahead" from an ES module.

Runtimerequire("jest-watch-typeahead")import "jest-watch-typeahead"
Node.js 18✗ failsERR_REQUIRE_ESM✗ failsError
Node.js 20✗ failsError✗ failsError
Node.js 22✗ failsError✗ failsError
Node.js 24✗ failsError✗ failsError
Node.js 26✗ failsError✗ failsError
Bun 1.4.0✗ failsError✗ failsError

How to import jest-watch-typeahead

ES modules (import)

import * as jestWatchTypeahead from "jest-watch-typeahead";

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS (require)

// require("jest-watch-typeahead") failed in our probe on Node.js 20.19+, 22.12+ and newer as well (Error); see the runtime table.

// Any Node.js version the package supports (>=18.0.0), from an async function:
async function main() {
  const jestWatchTypeahead = await import("jest-watch-typeahead");
}

// Or pin the last CommonJS release (declares Node.js >=10):
// npm install jest-watch-typeahead@0.6.5

Module format by version

Derived from the type, main and exports fields of every stable release on npm, corrected where a runtime test of that version contradicted them (26 versions; the newest 26 shown).

VersionsFormatFirst published
1.0.0 – 3.0.1ESM-onlySep 29, 2021
0.0.1 – 0.6.5CommonJSMay 29, 2018

Frequently asked

Is jest-watch-typeahead ESM-only?

jest-watch-typeahead@3.0.1 is ESM-only. jest-watch-typeahead dropped its CommonJS build in 1.0.0 (September 2021). The last version with a plain require()-able CommonJS entry is 0.6.5, published Sep 28, 2021; it declares support for Node.js >=10.

Which version of jest-watch-typeahead still supports CommonJS / require()?

0.6.5 is the last version of jest-watch-typeahead with a CommonJS build; it declares Node.js >=10. Install it with "npm install jest-watch-typeahead@0.6.5". Every version from 1.0.0 on is ESM-only.

How do I use jest-watch-typeahead from a CommonJS file?

From a CommonJS file, use a dynamic import inside an async function: const jestWatchTypeahead = await import("jest-watch-typeahead"). That works on every Node.js version the package supports (>=18.0.0). require("jest-watch-typeahead") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. Alternatively pin jest-watch-typeahead@0.6.5 (declares Node.js >=10).

Does jest-watch-typeahead work in Bun?

Importing jest-watch-typeahead failed in Bun 1.4.0 on Sep 9, 2026: error:

Does jest-watch-typeahead ship TypeScript types?

No. jest-watch-typeahead ships no type declarations and there is no @types package for it.

Links

Other esm-only packages

Similar popularity