# Is jsdoc-to-markdown ESM-only? Can you require() it?

> jsdoc-to-markdown@9.1.3 ships CommonJS and ESM builds. Dual package — require() works on every Node.js version we test; import works too.

Generates markdown API documentation from jsdoc annotated source code

Last verified Sep 9, 2026 against jsdoc-to-markdown@9.1.3.

jsdoc-to-markdown publishes both a CommonJS entry and a native ESM entry (ESM added in 9.0.0). require("jsdoc-to-markdown") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >=12.17. import "jsdoc-to-markdown" works alongside it.

## What to do

1. Nothing to change. require("jsdoc-to-markdown") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >=12.17. import * as jsdocToMarkdown from "jsdoc-to-markdown" works alongside it; use named imports for what the ESM entry exports.
2. TypeScript: npm install -D @types/jsdoc-to-markdown

## Facts

- Latest: 9.1.3 (Oct 3, 2025)
- Module format: Dual (CommonJS + ESM)
- Last CommonJS version: 9.1.3
- Native ESM since: 9.0.0
- TypeScript types: @types/jsdoc-to-markdown
- Node engines: >=12.17
- Weekly downloads: 155K
- License: MIT

## Runtime test results for jsdoc-to-markdown@9.1.3

Installed and executed on Sep 9, 2026 with require("jsdoc-to-markdown") from a CommonJS file and import "jsdoc-to-markdown" from an ES module.

| Runtime | require("jsdoc-to-markdown") | import "jsdoc-to-markdown" |
|---|---|---|
| Node.js 18 | works | works |
| Node.js 20 | works | works |
| Node.js 22 | works | works |
| Node.js 24 | works | works |
| Node.js 26 | works | works |
| Bun 1.4.0 | works | works |

## How to import jsdoc-to-markdown

ES modules:

```js
import * as jsdocToMarkdown from "jsdoc-to-markdown";
```

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

CommonJS:

```js
const jsdocToMarkdown = require("jsdoc-to-markdown");
```

## Module format by version

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

| Versions | Format | First published |
|---|---|---|
| 9.0.0 – 9.1.3 | Dual (CommonJS + ESM) | Sep 1, 2024 |
| 0.5.7 – 8.0.3 | CommonJS | Sep 9, 2014 |

## Frequently asked

**Is jsdoc-to-markdown ESM-only?**

jsdoc-to-markdown@9.1.3 ships CommonJS and ESM builds. jsdoc-to-markdown publishes both a CommonJS entry and a native ESM entry (ESM added in 9.0.0). require("jsdoc-to-markdown") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >=12.17. import "jsdoc-to-markdown" works alongside it.

**Can I require jsdoc-to-markdown?**

Yes. jsdoc-to-markdown ships a CommonJS entry alongside the native ESM entry. require("jsdoc-to-markdown") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >=12.17.

**Does jsdoc-to-markdown work in Bun?**

Yes. import "jsdoc-to-markdown" loaded successfully in Bun 1.4.0 on Sep 9, 2026.

**Does jsdoc-to-markdown ship TypeScript types?**

Not bundled. Install the community types with "npm install -D @types/jsdoc-to-markdown".

## Links

- [jsdoc-to-markdown on npm](https://www.npmjs.com/package/jsdoc-to-markdown)
- [Source repository](https://github.com/jsdoc2md/jsdoc-to-markdown)
- [HTML version](https://canirequire.com/package/jsdoc-to-markdown/)
- [JSON version](https://canirequire.com/package/jsdoc-to-markdown.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
