Reputation: 630
I am trying to run a react native project but I keep getting:
Watchman: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2020-12-20T01:04:27,184: [0x118044e00] the owner of /usr/local/var/run/watchman/mattroberts-state is uid 0 and doesn't match your euid 501
I think it is a permission problem but I don't know how to fix it. Does anyone know what is wrong and how to fix it?
If I could get the uid to match the euid, it seems it should be fixed, but I don't know how.
Upvotes: 3
Views: 1946
Reputation: 89
this worked for me
sudo chmod 0700 /usr/local/var/run/watchman/$(whoami)-state
Upvotes: 0
Reputation: 2373
If I could get the uid to match the euid, it seems it should be fixed, but I don't know how.
Looks like the owner of the watchman state directory is set to root. You can fix it by running:
sudo chown -R "$(whoami)" "/usr/local/var/run/watchman/$(whoami)-state"
Upvotes: 1
Reputation: 630
While I was unable to fix Watchman, after uninstalling it the React Native app runs. I don't think it will automatically reload, but you can still cause a reload to occur with command r in the simulator.
Since I had installed Watchman with homebrew, I uninstalled it with
brew uninstall Watchman
in the terminal
Upvotes: 0