react-native: watchman : unknown option --no-pretty error while npm start
Hi I am getting ‘unknown option --no-pretty’ error while trying to start development server of react-native android project.
I executed
npm start
Then i got this:
React packager ready.
ERROR: Unknown option --no-pretty
Watchman: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
ERROR watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
Error: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
at ChildProcess.<anonymous> (/home/sreejith/projects/sample/node_modules/react-native/node_modules/sane/node_modules/fb-watchman/index.js:194:18)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:817:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
Please help
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 44 (3 by maintainers)
ok i fixed it this way: npm r -g watchman brew update && brew upgrade brew install watchman
I have just solved an issue similar to this one by running
$ sudo chown -R $(whoami):admin /usr/local
I must have messed with the permissions at one point or the other. Hope it helps!
If $watchman --version does not work, you are not using the appropriate watchman. Uninstall NPM watchman by $sudo npm r -g watchman and re-install it with brew $brew install --HEAD watchman. If you had install with brew before, first uninstall with $brew uninstall watchman. So better:
sudo npm r -g watchman brew uninstall watchman brew install --HEAD watchman
watchman 4.5--------close Deco will be ok
In fact, the error notices " ERROR watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2017-07-06T15:33:28,862: [0x7fffb4e823c0] the permissions on /usr/local/var/run/watchman/zhengmeiyu-state allow others to write to it. Verify that you own the contents and then fix its permissions by running
chmod 0700 /usr/local/var/run/watchman/zhengmeiyu-state
",I try above solutions, but still did not solve the issue.Then I run $ chmod 0700 /usr/local/var/run/watchman/zhengmeiyu-state, it solves.My current solution is to just completely uninstall watchman. I can still develop without it.
@+1 for linux
I was using npm’s watchman. It was conflicting with the watchman installed with brew. Removed all other watchman installations in npm and installed again with brew. Now it is working properly.
are you guys using facebooks’ watchman? not the one thats on NPM
In my case (watchman 4.9.0),it show me the error: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2018-03-08T09:53:11,047: [0x7fffac994340] the owner of /usr/local/var/run/watchman/root-state is uid 501 and doesn’t match your euid 0
I try all above possible way but no luck and the only way to fix is going to the dir of /usr/local/var/run/watchman/ , and delete the dir of root-state, then restart watchman.
Same bug with watchman 4.9.0 on Windows. Works ok for a while then starts doing this (in
ember serve
from a cmd prompt with admin rights) and only way to fix is rebootWorked for me as well. Seemed like pcre needed an update.
I just run this code in terminal and it works my mac named liam so you need to change liam to your pc name
chmod 0700 /usr/local/var/run/watchman/liam-state
I was also on the same boat, but with below three line execution it resolved my error. Also make sure to close the deco. brew uninstall watchman npm r -g watchman brew install --HEAD watchman
I uninstalled and then installed the
watchman
Got solution from hint provided by amonmoce ; helped me completely 😃 https://github.com/facebook/react-native/issues/2941#issuecomment-222323506
I followed andruschka and mihriminaz, but use the command with
sudo
, it will surely solve it. Thanks buddies, you saved me hours and days 👍Non of these solutions are working for me. Using watchman v4.6.0
Same here. Why is this old bug happening again?
updated, found it probably related with Deco
https://github.com/decosoftware/deco-ide/issues/36#issuecomment-222900995
Still seeing this issue. None of the above fixed it for me. Running watchman 3.8.0