# Detox build script cannot be found in detox.configurations

**URL:** <https://discuss.bitrise.io/t/detox-build-script-cannot-be-found-in-detox-configurations/6343>\
**Category:** Builds\
**Created:** [September 28, 2018, 10:26am UTC](https://discuss.bitrise.io/t/detox-build-script-cannot-be-found-in-detox-configurations/6343 "2018-09-28T10:26:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robin.miklinski](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@robin.miklinski](https://discuss.bitrise.io/u/robin.miklinski)\
**Post date:** [September 28, 2018, 10:26am UTC](https://discuss.bitrise.io/t/detox-build-script-cannot-be-found-in-detox-configurations/6343/1 "2018-09-28T10:26:03Z")

</div>

# Bitrise Build Issue Report template

> **[Log in - Bitrise](https://app.bitrise.io/users/sign_in)**
>
> Bringing back the joy of iOS & Android development through automating build, testing and support cycles.

## Description of the issue

Error message ‘The build configuration cannot be found in detox.configurations[“${program.configuration}”]’ when running under a standard Detox configuration. The project structure has not been modified, it is also working locally. Have tried explicitly passing the config to both the `build` and `test` as suggested elsewhere. Can anyone help? Thanks.

## Environment:

Bitrise XCode 9.4.x MacOS 10.13

**Which build Step causes the issue and which version of the step?**

detox build & test:

detox clean-framework-cache && detox build-framework-cache

detox build -c ios.sim.debug

detox test -c ios.sim.debug --cleanup

note, I am specifying the config in package.json like this

“detox”: {  
“configurations”: {  
“ios.sim.debug”: {  
“binaryPath”: “../ios/build/Build/Products/Debug-iphonesimulator/testapp.app”,  
“build”: “xcodebuild -project ../ios/testapp.xcodeproj -scheme testapp -configuration Debug -sdk iphonesimulator -derivedDataPath ../ios/build”,  
“type”: “ios.simulator”,  
“name”: “iPhone 7”  
}  
},  
“specs”: “./detox/base/”,  
“test-runner”: “jest”,  
“runner-config”: “./detox/config.json”  
}

## Reproducibility

- _Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build)_ : NO
- _Does a rebuild without caches help? (You can remove the `Cache:Pull` and `Cache:Push` steps temporarily to not to use the cache, or [you can delete all the caches on the `Settings` tab of the app](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : NO
- _Does the issue happen sporadically, or every time?_ :
- _Does upgrading the build Step to the latest version help?_ : NO
- _When did the issue start?_ : Yesterday

### Local reproduction

_Can it be reproduced on your own Mac/PC by following our [local debug guide](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what [bitrise.io](http://bitrise.io) will get when it does a git clone in the clean environment! If possible please note which sections you tried._

## Build log

- detox build -c ios.sim.debug  
/Users/vagrant/git/node\_modules/detox/local-cli/detox-build.js:28  
throw new Error(`Could not find build script in detox.configurations["${program.configuration}"]`);  
^  
Error: Could not find build script in detox.configurations[“ios.sim.debug”]  
at Object. (/Users/vagrant/git/node\_modules/detox/local-cli/detox-build.js:28:9)  
at Module.\_compile (internal/modules/cjs/loader.js:702:30)  
at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:713:10)  
at Module.load (internal/modules/cjs/loader.js:612:32)  
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)  
at Function.Module.\_load (internal/modules/cjs/loader.js:543:3)  
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)  
at startup (internal/bootstrap/node.js:238:19)  
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)
- detox test -c ios.sim.debug --cleanup  
/Users/vagrant/git/node\_modules/detox/local-cli/detox-test.js:207  
if (\_.size(config.configurations) === 1) {  
^  
TypeError: Cannot read property ‘configurations’ of undefined  
at getDefaultConfiguration (/Users/vagrant/git/node\_modules/detox/local-cli/detox-test.js:207:21)  
at Object. (/Users/vagrant/git/node\_modules/detox/local-cli/detox-test.js:23:151)  
at Module.\_compile (internal/modules/cjs/loader.js:702:30)  
at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:713:10)  
at Module.load (internal/modules/cjs/loader.js:612:32)  
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)  
at Function.Module.\_load (internal/modules/cjs/loader.js:543:3)  
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)  
at startup (internal/bootstrap/node.js:238:19)  
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [October 28, 2018, 10:38am UTC](https://discuss.bitrise.io/t/detox-build-script-cannot-be-found-in-detox-configurations/6343/3 "2018-10-28T10:38:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
