canirequire › Dual (CommonJS + ESM) › @rushstack/eslint-patch
Is @rushstack/eslint-patch ESM-only? Can you require() it?
Enhance ESLint with better support for large scale monorepos
Last verified Sep 9, 2026 against @rushstack/eslint-patch@1.16.1. Markdown · JSON
Dual (CommonJS + ESM) Dual package on paper — require() failed in our runtime test
@rushstack/eslint-patch declares both a CommonJS entry and a native ESM entry (ESM added in 1.16.0), but require("@rushstack/eslint-patch") failed on every Node.js version in our probe: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. That usually means a missing peer dependency, a browser-only global, or a package that refuses to be loaded with require(); see the runtime table below.
What to do
- require("@rushstack/eslint-patch") failed in our probe on every Node.js version (The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions); check the package README for peer dependencies or setup before relying on it.
- TypeScript: types are bundled; install nothing extra.
Does @rushstack/eslint-patch@1.16.1 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@rushstack/eslint-patch") from a CommonJS file and import "@rushstack/eslint-patch" from an ES module.
| Runtime | require("@rushstack/eslint-patch") | import "@rushstack/eslint-patch" |
|---|---|---|
| Node.js 18 | ✗ failsError | ✗ 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 |
A failing require() on a CommonJS package usually means the package needs a browser/DOM global, a peer dependency, or a native binary that is not available in a bare Node.js process.
How to import @rushstack/eslint-patch
ES modules (import)
import * as eslintPatch from "@rushstack/eslint-patch";Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.
CommonJS (require)
// require("@rushstack/eslint-patch") failed in our probe on every Node.js version we test (The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions); see the runtime table.
const eslintPatch = require("@rushstack/eslint-patch");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 (44 versions; the newest 44 shown).
| Versions | Format | First published |
|---|---|---|
| 1.16.0 – 1.16.1 | Dual (CommonJS + ESM) | Feb 19, 2026 |
| 0.0.0 – 1.15.0 | CommonJS | Jun 17, 2020 |
Frequently asked
Is @rushstack/eslint-patch ESM-only?
@rushstack/eslint-patch@1.16.1 declares CommonJS and ESM builds, but require() fails at runtime. @rushstack/eslint-patch declares both a CommonJS entry and a native ESM entry (ESM added in 1.16.0), but require("@rushstack/eslint-patch") failed on every Node.js version in our probe: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. That usually means a missing peer dependency, a browser-only global, or a package that refuses to be loaded with require(); see the runtime table below.
Can I require @rushstack/eslint-patch?
Not in practice. @rushstack/eslint-patch declares a CommonJS entry, but require("@rushstack/eslint-patch") failed on every Node.js version in our probe: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. Check the package README for peer dependencies or setup before relying on it.
Does @rushstack/eslint-patch work in Bun?
Importing @rushstack/eslint-patch failed in Bun 1.4.0 on Sep 9, 2026: error: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions.
Does @rushstack/eslint-patch ship TypeScript types?
Yes. @rushstack/eslint-patch 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
- tslib 2.8.1Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
Similar popularity
- yup 1.7.1CommonJS
- mysql2 3.24.4CommonJS
- class-validator 0.15.1CommonJS
- @nestjs/core 12.0.1ESM-only
- mongodb 7.6.0CommonJS
- puppeteer 25.10.0ESM-only
- @nestjs/common 12.0.1ESM-only
- cookie-parser 1.4.7CommonJS