Environment:
OS: Linux 4.15
Node: 8.15.0
Yarn: 1.12.3
npm: 6.4.1
Watchman: 4.7.0
Xcode: N/A
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4
unable to talk to your watchman on /usr/local/var/run/watchman/ubuntu-state/sock! (Connection refused)
Please take a look through https://facebook.github.io/watchman/docs/troubleshooting.html and if you can't unblock yourself, please share your watchman logs.
For this sort of error, it's also a good idea to share things like the permissions on the sock file mentioned in the error output, and to include output from eg: ps that might indicate which user watchman is running as, and verify that it matches up to the user you are running as when you encounter the error.
Running watchman version can also help to rule out a local CLI issue from an issue with the more complicated integrations in eg: React Native.
This is an extremely weird error but all kinds of reinstallation of brew (I'm on Mac) node yarn and everything from scratch with the hard resetting of all of them didn't help. And yeah, reboots, many of them.
But just going to /usr/local/var/run/watchman/<username>-state/ and removing pid and other files that were there, fixed the issue.
Which is extremely weird, but just saying.
I ran into this same issue on my Mac (Mojave 10.14.6). Probably due to modifying /usr/local permissions to support multi-user Homebrew setup.
Changing directory owner back to <username> and making sure only it could read/write/exec (chmod 700) fixed it for me.
Most helpful comment
This is an extremely weird error but all kinds of reinstallation of
brew(I'm on Mac)nodeyarnand everything from scratch with the hard resetting of all of them didn't help. And yeah, reboots, many of them.But just going to
/usr/local/var/run/watchman/<username>-state/and removingpidand other files that were there, fixed the issue.Which is extremely weird, but just saying.