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
macOS watchman requirement easy to miss and hard to figure out #18959
Comments
Well, |
Hmmm... I cannot compile without it on 3.17... is this of interest to chase down? If so let me know what you'd want run (debug flags, etc.) and I can forward it along. My OS file handle limits are high, and it's a good machine with a 2TB internal SSD so maybe too much processing concurrency, or an issue in a lower-level dependency... let me know if it's worth pursuing. |
We should carry over this piece into the new guides: https://ember-cli.com/user-guide/#watchman. I saw teammates get bit by the "Too many files open" issue in the last months a few times too |
@mehulkar https://cli.emberjs.com/release/basic-use/#installingwatchman they have a watchman section, do you mean a specific part? |
@MatthewPringle Actually none - it was literally a fresh OOB MacBook and I needed to jump across quickly to keep up with projects so this was literally:
What threw me down the stairs was that it was full-out crashing the build and I know from the docs that watchman is not required, so it didn't occur to me to put it in. When I did, smooth sailing. |
I think at this point, at least for mid-sized projects of some kind of setup, watchman does indeed seem to be a required install. My setup couldn't be more vanilla when it happened. |
Hmm, seems pretty unfortunate. 🤔 FWIW, I noticed that cli.emberjs.com does suggest installing watchman as a basic prereq. What can we do to make that info more visible? |
We started using ember in 2013 (pre-CLI) so to be fair to you guys, we don't go to that page much now. We've got over 40 ember projects in the wild atm, some running very large financial institution applications for global fortune 100's, at least 10 with thousands of files - we're just about to put a 3.18 app out next week. I say all this because maybe the reality is I just was too far in and missed the basics. I do think that if it's a key requirement, it would make sense to have a visible warning per my earlier comment, but it sounds like that caused a bit of a rash once before. My computer doesn't charge me by the pixel-flash, so an extra warning line to me seems pretty harmless given how hard it was to get to the bottom of it (though I learned what 'snapdragon' is since that's where my file overload happened to be occurring...). The only way I would have been helped is if it came up in the process that watchman was missing. Similar to how ember checks npm versions up front - before that, it was hard to figure out if you happened to jump branches on a project and forgot to |
I wonder if we can actually detect the specific EMFILE style errors and then show a custom addition to the error message to link somewhere that discusses debugging that type of error (one of the things would be to install watchman, others would be about increasing file limits and whatnot). I think that would have provided you the critical info needed to get this issue fixed while not also creating a scary warning to first time users (that are unlikely to actually have an issue while doing something like the initial tutorial). 🤔 |
That sounds like a good idea. Also, the file limits are often readable env variables and watchman likewise can be detected, so a final splat might go something like this:
That would definitely have had me saying exactly what I finally ended up saying: "Oh ----, I forgot to install watchman." |
I upgraded my Mac Book and wound myself around the axle for a good hour or so trying to debug why
ember serve
was failing with EMFILE too many file handles. The build would then seem to hang for 30s after an initial error and then would proceed, finally failing several seconds later.DEBUG=ember-cli:watcher ember s
finally revealed the issue: watchman was not installed, but it took a while to get there.I suggest a quick check be done up front to issue a warning at launch if watchman is not present as I presume the failure could happen anywhere.
The text was updated successfully, but these errors were encountered: