react-nativejestjsdetox

Could not parse CLI arguments supported by "jest-cli" package Detox (React-native)


I'm trying to setup testing in my react-native application and I have followed the Detox documentation to a T

but if I run detox build --configuration android and then detox test --configuration android it bombs out and gives me the following error

detox[28124] ERROR: [cli.js] Could not parse CLI arguments supported by "jest-cli" package, see the error below.
detox[28124] ERROR: [cli.js] Error: Cannot find module '\node_modules\jest-cli\build\cli\args.js'
ERROR: [cli.js]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
ERROR: [cli.js]     at Function.Module._load (internal/modules/cjs/loader.js:746:27)
ERROR: [cli.js]     at Module.require (internal/modules/cjs/loader.js:974:19)
ERROR: [cli.js]     at require (internal/modules/cjs/helpers.js:101:18)
ERROR: [cli.js]     at resolveJestCliArgs \node_modules\detox\local-cli\utils\jestInternals.js:52:12)
ERROR: [cli.js]     at getJestBooleanArgs \node_modules\detox\local-cli\utils\splitArgv.js:54:12)
ERROR: [cli.js]     at Object.splitJestArgv [as jest] \node_modules\detox\local-cli\utils\splitArgv.js:91:53)
ERROR: [cli.js]     at prepareJestArgs \node_modules\detox\local-cli\test.js:170:44)
ERROR: [cli.js]     at Object.test [as handler] \node_modules\detox\local-cli\test.js:38:31)

Ive tried deleting package.lock.json & node_modules and I have unistalled jest and detox and reinstall both of them and I am still getting the same error.

Could anyone please direct me towards some solution or if you have a solution please be kind and share :)

PS: I did look on the interwebs before posting here - no solution available that I can find regarding this


Solution

  • It was a bug with Detox and and jest - Made a ticket on their github issues its been resolved and they added a fix for it see - https://github.com/wix/Detox/issues/3629