Skip to main content
Version: 20.x

detox build

detox build [options]

Runs the build command of the app (or apps) from the specified configuration.

OptionDescription
-c, --configuration <device config>Select a device configuration from your defined configurations, if not supplied, and there’s only one configuration, detox will default to it
-C, --config-path <configPath>Specify Detox config file path. If not supplied, detox searches for .detoxrc[.js] or "detox" section in package.json
-i, --if-missingExecute the build command only if the app binary is missing.
-s, --silentDo not fail with error if an app config has no build command.
--helpShow help

Examples

If you have only one configuration, you can simply use:

detox build

To choose a specific configuration:

detox build --configuration yourConfiguration

To skip building an app if it already is built:

detox build --configuration yourConfiguration --if-missing