canirequire › Dual (CommonJS + ESM) › @babel/runtime-corejs3
Is @babel/runtime-corejs3 ESM-only? Can you require() it?
babel's modular runtime helpers with core-js@3 polyfilling
Last verified Sep 9, 2026 against @babel/runtime-corejs3@8.0.0. Markdown · JSON
Dual (CommonJS + ESM) Dual package, subpaths only — require("@babel/runtime-corejs3/…") works, require("@babel/runtime-corejs3") does not
@babel/runtime-corejs3 exposes only subpaths in its exports map, for example "@babel/runtime-corejs3/helpers/get"; there is no root entry, so require("@babel/runtime-corejs3") and import "@babel/runtime-corejs3" both throw ERR_PACKAGE_PATH_NOT_EXPORTED. Each subpath ships a CommonJS and a native ESM build, so require("@babel/runtime-corejs3/helpers/get") and import "@babel/runtime-corejs3/helpers/get" both work.
What to do
- Load subpaths, never the bare name: const runtimeCorejs3 = require("@babel/runtime-corejs3/helpers/get") or import from "@babel/runtime-corejs3/helpers/get". require("@babel/runtime-corejs3") throws ERR_PACKAGE_PATH_NOT_EXPORTED.
- TypeScript: no types are available for @babel/runtime-corejs3; declare the module yourself if you need them.
Does @babel/runtime-corejs3@8.0.0 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@babel/runtime-corejs3") from a CommonJS file and import "@babel/runtime-corejs3" from an ES module.
| Runtime | require("@babel/runtime-corejs3") | import "@babel/runtime-corejs3" |
|---|---|---|
| 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 @babel/runtime-corejs3
ES modules (import)
import * as runtimeCorejs3 from "@babel/runtime-corejs3/helpers/get";Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.
CommonJS (require)
const runtimeCorejs3 = require("@babel/runtime-corejs3/helpers/get");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 (134 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 7.18.3 – 8.0.0 | Dual (CommonJS + ESM) | May 25, 2022 |
Frequently asked
Is @babel/runtime-corejs3 ESM-only?
@babel/runtime-corejs3@8.0.0 ships CommonJS and ESM builds, reachable only through subpaths. @babel/runtime-corejs3 exposes only subpaths in its exports map, for example "@babel/runtime-corejs3/helpers/get"; there is no root entry, so require("@babel/runtime-corejs3") and import "@babel/runtime-corejs3" both throw ERR_PACKAGE_PATH_NOT_EXPORTED. Each subpath ships a CommonJS and a native ESM build, so require("@babel/runtime-corejs3/helpers/get") and import "@babel/runtime-corejs3/helpers/get" both work.
Can I require @babel/runtime-corejs3?
Only by subpath. require("@babel/runtime-corejs3") throws ERR_PACKAGE_PATH_NOT_EXPORTED because the exports map has no root entry; require("@babel/runtime-corejs3/helpers/get") works, and so does import from the same subpath.
Does @babel/runtime-corejs3 work in Bun?
Importing @babel/runtime-corejs3 failed in Bun 1.4.0 on Sep 9, 2026: error: Cannot find module '@babel/runtime-corejs3' from '/Users/boat/Projects/top-seo/data/probe-work/@babel__runtime-corejs3/imp.mjs'
Does @babel/runtime-corejs3 ship TypeScript types?
No. @babel/runtime-corejs3 ships no type declarations and there is no @types package for it.
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
- sinon 22.1.0Dual
- history 5.3.0CommonJS
- @babel/plugin-proposal-object-rest-spread 7.20.7CommonJS
- webpack-cli 7.2.3CommonJS
- eslint-plugin-jest 29.16.6CommonJS
- isomorphic-fetch 3.0.0CommonJS
- stylelint 17.15.0ESM-only
- js-beautify 2.0.3CommonJS