-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watch mode stopped working on macOS Sierra #1767
Comments
I had the same issue. Upgrading |
I'm quite confident this is not a Jest issue but either an underlying module or something else on your system. Unsure how to troubleshoot, everything is fine here on Sierra. |
I also got a similar report about Sierra: facebook/create-react-app#713 |
@cpojer Do you have a Sierra? Have you tried 6.6.0 on it? |
Per facebook/create-react-app#713 (comment), uninstalling Watchman fixes the issue so it’s either a problem with Watchman, or its Jest integration on Sierra. |
A few other possibly related threads: ember-cli/ember-cli#6259 Can you try any suggestions there and report back? |
@gaearon I'm using node 6.6.0 on Sierra with watchman and everything is fine. |
Definitely seems like a watchman/upgrading issue. I'm gonna close this out for now but happy to reopen in case this is actually a Jest problem. Since many people reported this on other projects (rn) it is unlikely though. |
I do not believe I have ever had watchman installed and I just now am experiencing this issue with jest in watch mode. I also recently upgraded to macOS Sierra. My guess is watchman can help (and I will try it as a workaround) but I don't think the problem is native to having or using watchman |
FWIW I don't have watchman installed and still had this bug, but deleting my |
I think it is a bit short through the corner to close this issue. Jest reports an error, so maybe the problem is in one of the dependencies which need to be updated? I removed my node_modules and reinstalled, but to no avail. I never installed watchman and even if I did, the dependencies should be coming from my package.json, not from any external program I installed. |
I was thinking that |
I installed new node binary (6.7.0), removed node_modules again, reinstalled everything but still the same error. But I guess the problem is that it is trying to watch too many files at once: http://stackoverflow.com/questions/8965606/node-and-error-emfile-too-many-open-files |
The folks over on react-native fixed the too many files at once issue I think here However for me, it was still an upgrade of watchman that fixed it. |
Usually when this happens it is a sign to restart the computer. This happens frequently at FB too (unrelated to Jest) :( |
Sorry to be such a pain in the *ss. I raised the ulimits as pointed out in the issue @robzolkos pointed at, but why would I need to install watchman? It is not a dependency of Jest, I just use Jest out of the box as is. This is my setup now:
The project contains about 45k files (including node_modules) so I don't see why it could still give me an EMFILE. I will check if installing watchman is a workaround. |
@hmeerlo watchman is a file watching service built by FB to make file system operations faster. Jest will run much faster on a big repo if watchman is installed and it brings the startup overhead of Jest to practically nothing as it will only statically analyze files that have changed. |
Thanx, I just checked it and it works flawless now, but there still is another issue somewhere for people who do not have watchman installed, as it is not a requirement for jest. |
It's not a strict requirement but just like react-native, on big repositories with large dependency trees (lots of node modules, for example), we do recommend watchman for better performance and to avoid the problems mentioned in this issue. I would recommend your team to install it to speed up common file system operations. |
@cpojer Should we document Watchman in CRA User Guide? |
@gaearon Yeah, I don't think there is any problem with that. I would recommend adding it to the Jest docs as well. I'm unsure how big the dependency tree of cra's node_modules is. If it is sufficiently large we should probably recommend watchman to most people. |
FYI Even though reinstall all +1 to documenting it in Jest as a recommended install. |
It's unclear what the outcome of this issue is. Just now I've freshly installed Jest (with fresh |
Do you have problems if you uninstall Watchman completely? Jets should use the Node based watcher if you do so. Do you have issues with it as well? |
@gaearon I only got it to work by installing Watchman. Without Watchman, no luck. |
Same here, it's without watchman that it doesn't work for me |
I was having this problem using node 4.6.0 after upgrading to Sierra. After upgrading node to v6.7.0, clearing node_modules and running a new npm install, jest watch started working again. I had to both upgrade node and then clear node_modules, though; those things individually didn't fix the problem. |
Mac OS Sierra (10.12.1). Node 6.7. If I don't install watchman, I get the error. Please reopen. This is a jest problem, and also creates problems when using create-react-app. |
I get this error with jest 21, but not with jest 20. |
I didn't have Watchman installed, but a |
Also didn't have Watchman installed & Node: v6.9.5 |
@dchambers I had the opposite issue: |
Incredibly strange, I was trying to figure this out, I uninstalled watchman using |
This is still broken in High Sierra with a |
I had to install watchman, which is weird that everyone is saying they had to uninstall it. I'm just happy it's working :) |
I once again had to downgrade Jest because of some cryptic error. Love Jest and downgrading worked. But I'm not getting the most recent version of Jest to play along in any way! |
|
I was working on a simple React project created from I was simply trying to add some Jest tests running Resulted in an error:
OSX - 10.13.3 Project Enviroment I tried Setting the permissions on the This did though:
|
|
I had exactly the same problem. |
Whether the test succeeds or not, it just hangs after all tests are executed. Using
|
I'm using Removing Edit: upgrading to the alpha version of |
After adding Enzyme 3.3.0, this issue started for my team using an ejected version of CRA. We're all on High Sierra if that matters. |
+1 more for installing Watchman. Don't like it, but it did work |
@robzolkos thanks. But I don't want to install |
I just ran into this myself, but what caused it was installing these packages in my CRA as dev dependencies:
removing these dependencies fixed the issue. node: 8.9.4 || 8.11.3 I didn't bother to install watchman with brew. |
How i fixes this was. At first i tried then i removed my node modules in short
might help someone. :) |
I was not using create-react-app, and i've solved removing the |
Upgrading Jest (or react-scripts if you use cra) fixed it for me. React-scripts 2 went stable recently. |
Still have the same issue here. Someone has opened an issue on the watchman repository? |
For anyone else still having this problem, I was able to resolve it by adding my
Credit owed to @reergymerej from here. |
I'm still having this issue. Using latest |
My tests were working perfectly fine, and all the sudden they stopped working. The reinstall of brew upgrade
brew uninstall watchman
brew install watchman |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is a bug that seems to happen ever since I've updated to Sierra.
Whenever I want to run Jest in
--watch
mode it crashes:Tried reinstalling the node modules, checking for any updates and anything. I can't seem to reproduce it on a new project but on the other hand even if I just run an empty test suite with
--testPathPattern
it still crashes, so I'm guessing it's a dependency conflict somewhere. I don't have any setup files or anything, it's literally running an empty file and crashing.I don't get any more output with
--debug
so not sure what else to provide to help. This does not happen with--watchman
The text was updated successfully, but these errors were encountered: