canirequire

canirequireESM-only › @oclif/plugin-help

Is @oclif/plugin-help ESM-only? Can you require() it?

Standard help for oclif.

Last verified Sep 9, 2026 against @oclif/plugin-help@7.0.0. JSON

ESM-only ESM-only since 6.0.1 — last CommonJS version is 5.2.20

@oclif/plugin-help dropped its CommonJS build in 6.0.1 (October 2023). The last version you can require() on every Node.js version, including 18 and older, is 5.2.20, published Sep 28, 2023.

On Node.js 20.19+, 22.12+ and every newer release, require("@oclif/plugin-help") works anyway: Node can load synchronous ES modules through require(). Verified on Node 22, 24, 26. Node.js 18 and older still fail with ERR_REQUIRE_ESM.

@oclif/plugin-help@7.0.0 declares engines ">=22.0.0", so Node.js 18, 20 are outside its supported range regardless of module format.

Latest
7.0.0 (Aug 31, 2026)
Module format
ESM-only
Last CommonJS version
5.2.20
ESM-only since
6.0.1 (Oct 12, 2023)
TypeScript types
Bundled
Node engines
>=22.0.0
License
MIT

Does @oclif/plugin-help@7.0.0 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("@oclif/plugin-help") from a CommonJS file and import "@oclif/plugin-help" from an ES module.

Runtimerequire("@oclif/plugin-help")import "@oclif/plugin-help"
Node.js 18✗ failsERR_REQUIRE_ESM✓ works
Node.js 20✓ works✓ works
Node.js 22✓ works✓ works
Node.js 24✓ works✓ works
Node.js 26✓ works✓ works
Bun 1.4✓ works✓ works

How to import @oclif/plugin-help

ES modules (import)

import pluginHelp from "@oclif/plugin-help";

CommonJS (require)

// Node.js 20.19+ / 22.12+ / newer (package has no top-level await):
const pluginHelp = require("@oclif/plugin-help");

// Any Node.js version:
const pluginHelp = await import("@oclif/plugin-help");

// Or pin the last CommonJS release:
// npm install @oclif/plugin-help@5.2.20

Module format by version

Derived from the type, main and exports fields of every stable release on npm (207 versions; the newest 60 shown).

VersionsFormatFirst published
6.2.1 – 7.0.0ESM-onlyJun 9, 2024

Frequently asked

Is @oclif/plugin-help ESM-only?

@oclif/plugin-help@7.0.0 is ESM-only. @oclif/plugin-help dropped its CommonJS build in 6.0.1 (October 2023). The last version you can require() on every Node.js version, including 18 and older, is 5.2.20, published Sep 28, 2023.

Which version of @oclif/plugin-help still supports CommonJS / require()?

5.2.20 is the last version of @oclif/plugin-help with a CommonJS build. Install it with "npm install @oclif/plugin-help@5.2.20". Every version from 6.0.1 on is ESM-only.

How do I use @oclif/plugin-help from a CommonJS file?

Use a dynamic import: const mod = await import("@oclif/plugin-help"). On Node.js 20.19+, 22.12+ and newer, a plain require("@oclif/plugin-help") also works for ESM packages that do not use top-level await. Alternatively pin @oclif/plugin-help@5.2.20.

Does @oclif/plugin-help work in Bun?

Yes. import "@oclif/plugin-help" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does @oclif/plugin-help ship TypeScript types?

Yes. @oclif/plugin-help bundles its own type declarations; no @types package is needed.

Links

Other esm-only packages

Similar popularity