How to use watchman in MacOS

2.3k Views Asked by At

I already uninstalled watchman using:

brew uninstall watchman

But when I type watchman in the cmd I still get:

2023-01-06T20:49:27,810: [] while computing sockname: failed to create /opt/local/var/run/watchman/renatoperes-state: No such file or directory

I noticed that actually when I install watchman on by brew uninstall watchman the system is adding the lib in

/usr/local/var/run/watchman/

Does anyone have a clue? Thanks!

1

There are 1 best solutions below

0
علی داودی On

Still no progress with installation using brew (even reinstalled Homebrew).

However this seems to work (it's based on watchman formula):

cd /usr/local/var/run
sudo mkdir watchman
sudo chmod 042777 watchman

The watchman version correctly returns the version now:

{
   "version": "4.9.0"
}

And it seems to hot reload code in React Native.