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. Markdown · JSON
ESM-only ESM-only since 0.42.0 — last CommonJS version is 0.41.0
react-native-builder-bob dropped its CommonJS build in 0.42.0 (June 2026). The last version with a plain require()-able CommonJS entry is 0.41.0, published Apr 1, 2026; it declares support for Node.js ^20.19.0 || ^22.12.0 || >= 23.4.0.
require("react-native-builder-bob") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. Node.js 18 has no require(esm), and react-native-builder-bob@0.43.1 declares Node.js ^20.19.0 || ^22.12.0 || >= 23.4.0, so 18 is outside its supported range anyway.
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.
What to do
- require("react-native-builder-bob") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it.
- From a CommonJS file, use a dynamic import inside an async function: const reactNativeBuilderBob = await import("react-native-builder-bob"). That works on every Node.js version the package supports (^20.19.0 || ^22.12.0 || >= 23.4.0).
- If you need a synchronous require(): npm install react-native-builder-bob@0.41.0, the last CommonJS release (published Apr 1, 2026); it declares Node.js ^20.19.0 || ^22.12.0 || >= 23.4.0.
- react-native-builder-bob@0.43.1 declares engines "^20.19.0 || ^22.12.0 || >= 23.4.0", so Node.js 18 is unsupported regardless: upgrade Node.js or pin an older release.
- TypeScript: no types are available for react-native-builder-bob; declare the module yourself if you need them.
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 | ✗ failsError | ✗ failsError |
| Node.js 22 | ✗ failsError | ✗ failsError |
| Node.js 24 | ✗ failsError | ✗ failsError |
| Node.js 26 | ✗ failsError | ✗ failsError |
| Bun 1.4.0 | ✗ failsError | ✗ failsError |
How to import react-native-builder-bob
ES modules (import)
import * as reactNativeBuilderBob from "react-native-builder-bob";Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.
CommonJS (require)
// require("react-native-builder-bob") failed in our probe on Node.js 20.19+, 22.12+ and newer as well (<command>); see the runtime table.
// Any Node.js version the package supports (^20.19.0 || ^22.12.0 || >= 23.4.0), from an async function:
async function main() {
const reactNativeBuilderBob = await import("react-native-builder-bob");
}
// Or pin the last CommonJS release (declares Node.js ^20.19.0 || ^22.12.0 || >= 23.4.0):
// npm install react-native-builder-bob@0.41.0Module 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 (78 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 0.42.0 – 0.43.1 | ESM-only | Jun 8, 2026 |
| 0.41.0 | Dual (CommonJS + ESM) | 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.42.0 (June 2026). The last version with a plain require()-able CommonJS entry is 0.41.0, published Apr 1, 2026; it declares support for Node.js ^20.19.0 || ^22.12.0 || >= 23.4.0.
Which version of react-native-builder-bob still supports CommonJS / require()?
0.41.0 is the last version of react-native-builder-bob with a CommonJS build; it declares Node.js ^20.19.0 || ^22.12.0 || >= 23.4.0. Install it with "npm install react-native-builder-bob@0.41.0". Every version from 0.42.0 on is ESM-only.
How do I use react-native-builder-bob from a CommonJS file?
From a CommonJS file, use a dynamic import inside an async function: const reactNativeBuilderBob = await import("react-native-builder-bob"). That works on every Node.js version the package supports (^20.19.0 || ^22.12.0 || >= 23.4.0). require("react-native-builder-bob") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. Alternatively pin react-native-builder-bob@0.41.0 (declares Node.js ^20.19.0 || ^22.12.0 || >= 23.4.0).
Does react-native-builder-bob work in Bun?
Importing react-native-builder-bob failed in Bun 1.4.0 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 - string-width 8.2.2last CJS
4.2.3 - ansi-regex 6.3.0last CJS
5.0.1 - escape-string-regexp 5.0.0last CJS
4.0.0
Similar popularity
- karma-firefox-launcher 2.1.3CommonJS
- grunt-contrib-copy 1.0.0CommonJS
- bower 1.8.14CommonJS
- karma-spec-reporter 0.0.37CommonJS
- @vue/cli-service 5.0.9CommonJS
- hardhat 3.16.0ESM-only
- rewire 9.0.1CommonJS
- codecov 3.8.3CommonJS