Hive Hive
Sign in

react_native_bundle: ‘unknown command bundle’ on React Native 0.86 — bundling moved to @react-native/community-cli-plugin

GitHub issue · Open

Metadata
Source
tuist/once #218
Updated
Aug 1, 2026
Domains
Once
Details

What happened

react_native_bundle invokes the bundler through @react-native-community/cli. As of React Native 0.86 that package is no longer a dependency of react-native, and it no longer provides a bundle command — bundling moved to @react-native/community-cli-plugin, which react-native does depend on.

On a default RN 0.86 project the build therefore prints the framework’s “missing CLI” notice:

⚠️ react-native depends on @react-native-community/cli for cli commands. To fix update your package.json to include:
"devDependencies": {
"@react-native-community/cli": "latest",
}

Following that advice does not help. With @react-native-community/cli@20.2.0 installed, the command does not exist:

error: unknown command 'bundle'

Why

In an RN 0.86 install:

// react-native/package.json dependencies
'@react-native/community-cli-plugin': '0.86.0'
'@react-native-community/cli': // not present
// what actually provides the command
require('@react-native/community-cli-plugin')
// => [ 'bundleCommand', 'startCommand', 'unstable_buildBundleWithConfig' ]

Neither @react-native-community/cli@20.2.0 nor react-native/cli.js lists bundle in --help; both only expose config, clean, info, init, doctor.

Reproduction

package.json:

{
"name": "rnapp",
"version": "1.0.0",
"main": "index.js",
"dependencies": {
"react": "19.2.3",
"react-native": "0.86.0"
},
"devDependencies": {
"@react-native/metro-config": "0.86.0"
}
}

once.toml:

[[target]]
name = "deps"
kind = "react_native_dependencies"
srcs = ["package.json", "bun.lock"]
[target.attrs]
package_json = "package.json"
lockfile = "bun.lock"
package_manager = "bun"
[[target]]
name = "js_bundle"
kind = "react_native_bundle"
srcs = ["index.js", "metro.config.js"]
deps = ["./deps"]
[target.attrs]
platform = "ios"
entry = "index.js"

index.jsexport default function App(){return null}, metro.config.js — the standard getDefaultConfig(__dirname).

bun install
once build js_bundle

Expected

The bundle action resolves bundleCommand from @react-native/community-cli-plugin (or invokes an entry point that still routes bundle), so a default RN 0.86 project bundles without adding a package the framework no longer depends on.

Note

The docs describe the starter as React Native 0.86, so this looks like it affects the documented baseline version rather than an unusual setup.

I could not carry this past the CLI resolution step on my machine to confirm what happens afterwards — this host has a /tmp/metro-cache owned by another user, so Metro fails with EACCES once it gets that far. That part is environmental and not related to the report; the unknown command 'bundle' failure above is reproducible on its own.

Environment

  • once 0.42.0 (x86_64-unknown-linux-gnu release build)
  • react-native 0.86.0, @react-native-community/cli 20.2.0, bun 1.4.0
  • Linux 6.8, x86_64
Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments

No GitHub comments yet.