canirequire › Dual (CommonJS + ESM) › victory-vendor
Is victory-vendor ESM-only? Can you require() it?
Vendored dependencies for Victory
Last verified Sep 9, 2026 against victory-vendor@37.3.6. Markdown · JSON
Dual (CommonJS + ESM) Dual package, subpaths only — require("victory-vendor/…") works, require("victory-vendor") does not
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
- 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.
- TypeScript: types are bundled; install nothing extra.
Does victory-vendor@37.3.6 actually load? Runtime test results
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 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| Node.js 20 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| Node.js 22 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| Node.js 24 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| Node.js 26 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| 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 victory-vendor
ES modules (import)
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 (require)
const victoryVendor = require("victory-vendor/d3-*");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 (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
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
- abbrev 5.0.0CommonJS
- redent 4.0.0ESM-only
- jest-environment-node 30.5.1Dual
- @radix-ui/rect 1.1.3Dual
- lie 3.3.0CommonJS
- siginfo 2.0.0CommonJS
- postcss-load-config 6.0.1CommonJS
- char-regex 2.0.2ESM-only