# Is victory-vendor ESM-only? Can you require() it?

> victory-vendor@37.3.6 ships CommonJS and ESM builds, reachable only through subpaths. Dual package, subpaths only — require("victory-vendor/…") works, require("victory-vendor") does not.

Vendored dependencies for Victory

Last verified Sep 9, 2026 against victory-vendor@37.3.6.

victory-vendor exposes only subpaths in its exports map, for example "victory-vendor/d3-*"; there is no root entry, so require("victory-vendor") and import "victory-vendor" both throw ERR_PACKAGE_PATH_NOT_EXPORTED. Each subpath ships a CommonJS and a native ESM build, so require("victory-vendor/d3-*") and import "victory-vendor/d3-*" both work.

## What to do

1. Load subpaths, never the bare name: const victoryVendor = require("victory-vendor/d3-*") or import from "victory-vendor/d3-*". require("victory-vendor") throws ERR_PACKAGE_PATH_NOT_EXPORTED.
2. TypeScript: types are bundled; install nothing extra.

## Facts

- Latest: 37.3.6 (Jan 14, 2025)
- Module format: Dual (CommonJS + ESM)
- Last CommonJS version: 37.3.6
- Native ESM since: 36.4.0
- TypeScript types: bundled
- Node engines: not declared
- Weekly downloads: 47.7M
- License: MIT AND ISC

## Runtime test results for victory-vendor@37.3.6

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

| Runtime | require("victory-vendor") | import "victory-vendor" |
|---|---|---|
| Node.js 18 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Node.js 20 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Node.js 22 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Node.js 24 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Node.js 26 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Bun 1.4.0 | fails (Error) | fails (Error) |

## How to import victory-vendor

ES modules:

```js
import * as victoryVendor from "victory-vendor/d3-*";
```

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

CommonJS:

```js
const victoryVendor = require("victory-vendor/d3-*");
```

## Module format by version

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

| Versions | Format | First published |
|---|---|---|
| 36.4.0 – 37.3.6 | Dual (CommonJS + ESM) | May 10, 2022 |

## Frequently asked

**Is victory-vendor ESM-only?**

victory-vendor@37.3.6 ships CommonJS and ESM builds, reachable only through subpaths. victory-vendor exposes only subpaths in its exports map, for example "victory-vendor/d3-*"; there is no root entry, so require("victory-vendor") and import "victory-vendor" both throw ERR_PACKAGE_PATH_NOT_EXPORTED. Each subpath ships a CommonJS and a native ESM build, so require("victory-vendor/d3-*") and import "victory-vendor/d3-*" both work.

**Can I require victory-vendor?**

Only by subpath. require("victory-vendor") throws ERR_PACKAGE_PATH_NOT_EXPORTED because the exports map has no root entry; require("victory-vendor/d3-*") works, and so does import from the same subpath.

**Does victory-vendor work in Bun?**

Importing victory-vendor failed in Bun 1.4.0 on Sep 9, 2026: error: Cannot find package 'victory-vendor' from '/Users/boat/Projects/top-seo/data/probe-work/victory-vendor/imp.mjs'

**Does victory-vendor ship TypeScript types?**

Yes. victory-vendor bundles its own type declarations; no @types package is needed.

## Links

- [victory-vendor on npm](https://www.npmjs.com/package/victory-vendor)
- [Source repository](https://github.com/FormidableLabs/victory)
- [HTML version](https://canirequire.com/package/victory-vendor/)
- [JSON version](https://canirequire.com/package/victory-vendor.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.
