Detox
Detox copied to clipboard
jest: command not found
What happened?
Installed as per guide, went to run detox test and I get:
user@mymac awesomeproject % detox test
17:16:34.833 detox[48462] INFO: [test.js] DETOX_REPORT_SPECS=true DETOX_START_TIMESTAMP=1656951394826 DETOX_USE_CUSTOM_LOGGER=true jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' e2e
/bin/sh: jest: command not found
17:16:34.849 detox[48462] ERROR: [cli.js] Command failed: jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' e2e
Seems detox can't find jest even though it is installed. It works if I install jest globally, but I do not want that.
What was the expected behaviour?
The tests to run.
Was it tested on latest Detox?
- [x] I have tested this issue on the latest Detox release and it still reproduces.
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 19.7.1 React Native version: 0.67.4 Node version: 16.13.1 Test-runner (select one): jest-circus
Detox logs
Detox logs
user@mymac awesomeproject % detox test --loglevel trace
17:22:39.371 detox[49523] INFO: [test.js] DETOX_LOGLEVEL="trace" DETOX_REPORT_SPECS=true DETOX_START_TIMESTAMP=1656951759364 DETOX_USE_CUSTOM_LOGGER=true jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' e2e
/bin/sh: jest: command not found
17:22:39.388 detox[49523] ERROR: [cli.js] Command failed: jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' e2e
Device logs
No response
More data, please!
I have checked ./node_modules/.bin/jest and that exists as expected.
Update: detox is installed globally and while detox test does not work, the npx detox test does.
Thanks @leepowelldev. It is generally better to run detox with npx. Does running jest free-style (regardless of Detox) work for you?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this reporsitory, read this discussion.
The issue has been closed for inactivity.