canirequire › ESM-only › react-native-builder-bob
Is react-native-builder-bob ESM-only? Can you require() it?
CLI to build JavaScript files for React Native libraries
Last verified Sep 9, 2026 against react-native-builder-bob@0.43.1. JSON
ESM-only ESM-only since 0.41.0 — last CommonJS version is 0.40.18
react-native-builder-bob dropped its CommonJS build in 0.41.0 (April 2026). The last version you can require() on every Node.js version, including 18 and older, is 0.40.18, published Feb 10, 2026.
require("react-native-builder-bob") failed in our probe on Node.js 20+ as well. See the runtime matrix below for the exact error.
react-native-builder-bob@0.43.1 declares engines "^20.19.0 || ^22.12.0 || >= 23.4.0", so Node.js 18 is outside its supported range regardless of module format.
Does react-native-builder-bob@0.43.1 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("react-native-builder-bob") from a CommonJS file and import "react-native-builder-bob" from an ES module.
| Runtime | require("react-native-builder-bob") | import "react-native-builder-bob" |
|---|---|---|
| Node.js 18 | ✗ failsERR_REQUIRE_ESM | ✗ failsSyntaxError |
| Node.js 20 | ✗ fails<command> | ✗ fails<command> |
| Node.js 22 | ✗ fails<command> | ✗ fails<command> |
| Node.js 24 | ✗ fails<command> | ✗ fails<command> |
| Node.js 26 | ✗ fails<command> | ✗ fails<command> |
| Bun 1.4 | ✗ failsreq.cjs <command> | ✗ failsimp.mjs <command> |
How to import react-native-builder-bob
ES modules (import)
import reactNativeBuilderBob from "react-native-builder-bob";CommonJS (require)
// Node.js 20.19+ / 22.12+ / newer (package has no top-level await):
const reactNativeBuilderBob = require("react-native-builder-bob");
// Any Node.js version:
const reactNativeBuilderBob = await import("react-native-builder-bob");
// Or pin the last CommonJS release:
// npm install react-native-builder-bob@0.40.18Module format by version
Derived from the type, main and exports fields of every stable release on npm (78 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 0.41.0 – 0.43.1 | ESM-only | Apr 1, 2026 |
| 0.23.0 – 0.40.18 | CommonJS | Sep 30, 2023 |
Frequently asked
Is react-native-builder-bob ESM-only?
react-native-builder-bob@0.43.1 is ESM-only. react-native-builder-bob dropped its CommonJS build in 0.41.0 (April 2026). The last version you can require() on every Node.js version, including 18 and older, is 0.40.18, published Feb 10, 2026.
Which version of react-native-builder-bob still supports CommonJS / require()?
0.40.18 is the last version of react-native-builder-bob with a CommonJS build. Install it with "npm install react-native-builder-bob@0.40.18". Every version from 0.41.0 on is ESM-only.
How do I use react-native-builder-bob from a CommonJS file?
Use a dynamic import: const mod = await import("react-native-builder-bob"). On Node.js 20.19+, 22.12+ and newer, a plain require("react-native-builder-bob") also works for ESM packages that do not use top-level await. Alternatively pin react-native-builder-bob@0.40.18.
Does react-native-builder-bob work in Bun?
Importing react-native-builder-bob failed in Bun 1.4 on Sep 9, 2026: imp.mjs <command>
Does react-native-builder-bob ship TypeScript types?
No. react-native-builder-bob ships no type declarations and there is no @types package for it.
Links
Other esm-only packages
- ansi-styles 7.0.0last CJS
5.2.0 - strip-ansi 7.2.0last CJS
6.0.1 - commander 15.0.0last CJS
14.0.3 - supports-color 11.0.0last CJS
8.1.1 - chalk 6.0.0last CJS
4.1.2 - tslib 2.8.1last CJS
2.5.2 - string-width 8.2.2last CJS
4.2.3 - ansi-regex 6.3.0last CJS
5.0.1
Similar popularity
- karma-firefox-launcher 2.1.3CommonJS
- grunt-contrib-copy 1.0.0CommonJS
- bower 1.8.14CommonJS
- karma-spec-reporter 0.0.37CommonJS
- hardhat 3.16.0ESM-only
- rewire 9.0.1CommonJS
- codecov 3.8.3CommonJS
- grunt-contrib-uglify 5.2.2CommonJS