# Is @babel/runtime ESM-only? Can you require() it?

> @babel/runtime@8.0.0 ships CommonJS and ESM builds, reachable only through subpaths. Dual package, subpaths only — require("@babel/runtime/…") works, require("@babel/runtime") does not.

babel's modular runtime helpers

Last verified Sep 9, 2026 against @babel/runtime@8.0.0.

@babel/runtime exposes only subpaths in its exports map, for example "@babel/runtime/helpers/get"; there is no root entry, so require("@babel/runtime") and import "@babel/runtime" both throw ERR_PACKAGE_PATH_NOT_EXPORTED. Each subpath ships a CommonJS and a native ESM build, so require("@babel/runtime/helpers/get") and import "@babel/runtime/helpers/get" both work.

## What to do

1. Load subpaths, never the bare name: const runtime = require("@babel/runtime/helpers/get") or import from "@babel/runtime/helpers/get". require("@babel/runtime") throws ERR_PACKAGE_PATH_NOT_EXPORTED.
2. TypeScript: no types are available for @babel/runtime; declare the module yourself if you need them.

## Facts

- Latest: 8.0.0 (Jun 16, 2026)
- Module format: Dual (CommonJS + ESM)
- Last CommonJS version: 8.0.0
- Native ESM since: 7.13.0
- TypeScript types: none
- Node engines: not declared
- Weekly downloads: 134.1M
- License: MIT

## Runtime test results for @babel/runtime@8.0.0

Installed and executed on Sep 9, 2026 with require("@babel/runtime") from a CommonJS file and import "@babel/runtime" from an ES module.

| Runtime | require("@babel/runtime") | import "@babel/runtime" |
|---|---|---|
| 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 @babel/runtime

ES modules:

```js
import * as runtime from "@babel/runtime/helpers/get";
```

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

CommonJS:

```js
const runtime = require("@babel/runtime/helpers/get");
```

## Module format by version

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

| Versions | Format | First published |
|---|---|---|
| 7.17.9 – 8.0.0 | Dual (CommonJS + ESM) | Apr 6, 2022 |

## Frequently asked

**Is @babel/runtime ESM-only?**

@babel/runtime@8.0.0 ships CommonJS and ESM builds, reachable only through subpaths. @babel/runtime exposes only subpaths in its exports map, for example "@babel/runtime/helpers/get"; there is no root entry, so require("@babel/runtime") and import "@babel/runtime" both throw ERR_PACKAGE_PATH_NOT_EXPORTED. Each subpath ships a CommonJS and a native ESM build, so require("@babel/runtime/helpers/get") and import "@babel/runtime/helpers/get" both work.

**Can I require @babel/runtime?**

Only by subpath. require("@babel/runtime") throws ERR_PACKAGE_PATH_NOT_EXPORTED because the exports map has no root entry; require("@babel/runtime/helpers/get") works, and so does import from the same subpath.

**Does @babel/runtime work in Bun?**

Importing @babel/runtime failed in Bun 1.4.0 on Sep 9, 2026: error: Cannot find module '@babel/runtime' from '/Users/boat/Projects/top-seo/data/probe-work/@babel__runtime/imp.mjs'

**Does @babel/runtime ship TypeScript types?**

No. @babel/runtime ships no type declarations and there is no @types package for it.

## Links

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