Skip to content

JSON output and exit codes

With --json, every command prints exactly one JSON document on stdout. It is written synchronously, so large documents are not truncated when the process exits.

The top level always has success: true plus command-specific keys:

{
"success": true,
"platforms": {
"ios": {
"status": "success",
"version": "1.2.0",
"artifactPath": "output/MyApp-1.2.0-12.ipa",
"durationSeconds": 412,
"error": null
}
}
}

Always this shape:

{
"success": false,
"error": {
"code": "MISSING_CONFIG_SHIPYARD",
"message": "Project not initialized. .shipyard/config.json not found.",
"fix": "Run 'rn-shipyard init' to set up the project first"
}
}

code is stable and safe to match on. message is for people. fix says what to do. See Error codes.

Usage errors (unknown option, missing argument) also use this envelope, with INVALID_USAGE.

CommandKeys
buildsuccess, platforms, prebuild, warnings, and submit when --submit is used
submitsuccess, platforms. With --dry-run: dryRun: true, cwd and per platform status, artifactPath, command, problems
initsuccess, config, setup (per platform status; ios.status is configured, imported, skipped or failed, with reason and nextStep when not done; preserved lists platforms kept from the existing config), nextSteps, files, and warnings. When ios.status is failed, success is false, error is { code, message, fix } and the exit code is 1; the rest of the document stays. With --from-eas also imported and plaintextFiles
doctorsuccess, checks, readiness, summary, nextStep, and error when a check failed

prebuild.<platform>.action is generated, skipped_tracked or refused. warnings lists everything that would have been printed as a warning.

CodeMeaning
0Success
1Error. At least one platform or check failed
2Missing configuration. Not initialized, or a required value is missing in --non-interactive mode. Any error code starting with MISSING_CONFIG exits 2
129Interrupted by SIGHUP (terminal closed)
130Interrupted by SIGINT (Ctrl-C)
143Interrupted by SIGTERM

On interruption, a final {"success":false,"error":{"code":"INTERRUPTED",...}} is written to stdout if it is still open; the human notice goes to stderr.

rn-shipyard is an independent open-source project, not affiliated with or endorsed by Expo. Expo and EAS are trademarks of 650 Industries, Inc.