$ cypress run
Started video recording: /foo/figtf.mp4
(Tests Starting)
Oops...we found an error preparing this test file:
/foo/cypress/integration/foo_spec.js
The error was:
Error: EMFILE: too many open files, open '/foo/node_modules/ramda/package.json'
This occurred while Cypress was compiling and bundling your test code. This is usually caused by:
* A missing file or dependency
* A syntax error in the file or one of its dependencies
Fix the error in your code and re-run your tests.
(Tests Finished)
- Tests: 0
- Passes: 0
- Failures: 1
- Pending: 0
- Duration: 0 seconds
- Screenshots: 0
- Video Recorded: true
- Cypress Version: 0.18.4
Oops...we found an error preparing this test file:
Same error happens here when I require others dependencies like lodash, axios, etc.
You didn't mention which OS you're on, but this is basically a file watching limit problem. It's quite common for both browserify and webpack, and there are a bunch of issues open related to that.
By default OSX has an extremely low limit, I think around 256.
A quick google search yields some solutions - but they are different based on linux vs OSX.
In OSX you can do ulimit -n 10480
We likely can just catch these errors and tell you exactly what to do based on your OS.
The problem is that to bundle your spec files, your OS is being told to open a large number of files as it hunts for all require / import statements, which exceeds its limit.
I try in OSX:
sudo launchctl limit maxfiles 512 unlimited
thats work for me! 馃帀 馃帀
@brian-mann should we close this?
This solution isn't working for me :-(
Sorry, meant to add: Any help is appreciated. Even if you could just try to set it up locally and let me know if you get the same error, that'd be helpful :)
Fixed in 0.19.1.
Thank you!
Verified. Thank you so much!
Most helpful comment
Fixed in
0.19.1.