Detox: Error: Cannot find module 'mocha/lib/cli/run-option-metadata'

Configuring Detox on android giving me this error on running npx detox test --configuration android.emu.release

  • My .detoxrc is written similar to this

Getting this errors Screenshot 2021-03-19 at 8 56 11 PM

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19

Most upvoted comments

@sumukhah , so this is exactly where I would expect to see:

 {
+  "testRunner": "jest",
+  "runnerConfig": "e2e/config.json",
   "devices": {
     "emulator": {
...

Due to compatibility reasons, default runner for Detox is mocha, although de facto we recommend jest.

@shootermv make sure you are using Detox 18.16.0 and above.

Thanks, now I get why I could not reproduce this issue. 👍 I’ll improve the error message soon.