question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not parse CLI arguments supported by "jest-cli" package, see the error below

See original GitHub issue

What happened?

After going throught the documentation and running detox test --configuration android it bombs out and gives the following stack trace

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)

What was the expected behaviour?

It should run the command as expected in the documentation

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

Went through the documentation as this is a fresh install of detox after configuring everything and installing the needed packages (jest, detox and setup the configs etc) I ran detox test --configuration android and it bombs out sky high giving this 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)

In what environment did this happen?

Detox version: "detox": "^19.12.5", React Native version: "react-native": "0.69.4", Node version: v14.20.0 Device model: Pixel 4 Android version: 12 Test-runner (select one): jest as recommended by the documentation

Detox logs

Detox logs
paste logs here!

Device logs

Device logs
paste logs here!

More data, please!

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14

github_iconTop GitHub Comments

2reactions
noomorphcommented, Oct 14, 2022

Downgrade to Jest 28.x meanwhile.

1reaction
noomorphcommented, Oct 14, 2022

ETA is 1 hour approx.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not parse CLI arguments supported by "jest-cli ...
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...
Read more >
Jest CLI Options
Jest CLI Options. The jest command line runner has a number of useful options. You can run jest --help to view all available...
Read more >
jest-cli | Yarn - Package Manager
Instant Feedback: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed files....
Read more >
cli: Helpers for Developing Command Line Interfaces - R Project
This function helps with multi-column output of ANSI styles strings. It works well together with boxx(), see the example below. Usage.
Read more >
Use resolveJestDependency in root With Examples | LambdaTest
Run root automation tests on LambdaTest cloud grid ... Perform automation testing on 3000+ real desktop and mobile devices online. Sign up Free....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found