canirequire

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

  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.
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

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.

Runtimerequire("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).

VersionsFormatFirst published
36.4.0 – 37.3.6Dual (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

Similar popularity