Skip to content
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

watchman : unknown option --no-pretty error while npm start #2941

Closed
sreejith-m-sreedharan opened this issue Sep 22, 2015 · 44 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@sreejith-m-sreedharan
Copy link

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

@andruschka
Copy link

+1

@bitQ2019
Copy link

brew update or use brew install brew --head may help

@mkonicek
Copy link
Contributor

Thanks for reporting! What does watchman --version print for you? I'm on 3.8.0.

@aroth
Copy link
Contributor

aroth commented Sep 23, 2015

+1 occurs with 3.7.0 and 3.8.0

@andruschka
Copy link

watchman --version outputs:
ERROR: Unknown option --version

@farzd
Copy link

farzd commented Sep 23, 2015

are you guys using facebooks' watchman?
not the one thats on NPM

@andruschka
Copy link

ok i fixed it this way:
npm r -g watchman
brew update && brew upgrade
brew install watchman

@sreejith-m-sreedharan
Copy link
Author

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.

@danoctavian
Copy link

This fixed it for me:

brew update && brew upgrade
brew install watchman

@Ahrengot
Copy link

Ahrengot commented Oct 4, 2015

Still seeing this issue. None of the above fixed it for me. Running watchman 3.8.0

@3210jr
Copy link

3210jr commented Oct 29, 2015

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!

@mihriminaz
Copy link

brew uninstall watchman
brew link pcre
brew install --HEAD watchman

and be sure that you changed the localhost with your localhost url (ifconfig command to check -> http://127.0.0.1:8081/index.ios.bundle?platform=ios&dev=true in my case)

@philopian
Copy link

awesome thanks!!

@Alexintosh
Copy link

Same problem with watchman 4.5.0

@zachzhao1984
Copy link

same problem with watchman 4.5.0

1 similar comment
@karna41317
Copy link

same problem with watchman 4.5.0

@Gagege
Copy link

Gagege commented May 26, 2016

My current solution is to just completely uninstall watchman. I can still develop without it.

@theobouwman
Copy link

theobouwman commented May 27, 2016

same with watchman 4.5.0
plz fix

@pycal
Copy link

pycal commented May 27, 2016

updating xquartz to latest fixed this
https://www.xquartz.org/

@amonmoce
Copy link

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

@umarF
Copy link

umarF commented May 31, 2016

@amonmoce Your solution doesn't work.
I had everything working and suddenly the next day started getting this error

ERROR watchman--no-pretty get-sockname returned with exit code 1 2016-05-31T13:28:44,040: [cli] failed to identify PDU: fill_buffer: EOF
2016-05-31T13:28:44,040: [cli] unable to talk to your watchman on /usr/local/Cellar/watchman/HEAD/var/run/watchman/umar-state/sock! (Undefined error: 0)

Error: watchman--no-pretty get-sockname returned with exit code 1 2016-05-31T13:28:44,040: [cli] failed to identify PDU: fill_buffer: EOF
2016-05-31T13:28:44,040: [cli] unable to talk to your watchman on /usr/local/Cellar/watchman/HEAD/var/run/watchman/umar-state/sock! (Undefined error: 0)

at ChildProcess.<anonymous> (/Users/umar/Documents/AwesomeProject/node_modules/react-native/node_modules/sane/node_modules/fb-watchman/index.js:198:18)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827: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:475:12)`

Any resolutions towards breaking in watchman 4.5.0 ?! [For now running with watchman uninstalled]

@scerelli
Copy link

same error

 ERROR  watchman--no-pretty get-sockname returned with exit code 1 2016-05-31T12:59:39,512: [cli] failed to identify PDU: fill_buffer: EOF
2016-05-31T12:59:39,513: [cli] unable to talk to your watchman on /usr/local/Cellar/watchman/HEAD/var/run/watchman/voodo-state/sock! (Undefined error: 0)

Error: watchman--no-pretty get-sockname returned with exit code 1 2016-05-31T12:59:39,512: [cli] failed to identify PDU: fill_buffer: EOF
2016-05-31T12:59:39,513: [cli] unable to talk to your watchman on /usr/local/Cellar/watchman/HEAD/var/run/watchman/voodo-state/sock! (Undefined error: 0)```

@asarazan
Copy link

+1 here please reopen.

@tiye
Copy link

tiye commented Jun 1, 2016

Same here. Why is this old bug happening again?

 ERROR  watchman--no-pretty get-sockname returned with exit code 1 2016-06-01T13:42:56,267: [cli] failed to identify PDU: fill_buffer: EOF
2016-06-01T13:42:56,268: [cli] unable to talk to your watchman on /usr/local/Cellar/watchman/4.5.0/var/run/watchman/chen-state/sock! (Undefined error: 0)

Error: watchman--no-pretty get-sockname returned with exit code 1 2016-06-01T13:42:56,267: [cli] failed to identify PDU: fill_buffer: EOF
2016-06-01T13:42:56,268: [cli] unable to talk to your watchman on /usr/local/Cellar/watchman/4.5.0/var/run/watchman/chen-state/sock! (Undefined error: 0)

    at ChildProcess.<anonymous> (/Users/chen/repo/gist/T/node_modules/fb-watchman/index.js:198:18)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:492:12)

updated, found it probably related with Deco

decosoftware/deco-ide#36 (comment)

@firegnu
Copy link

firegnu commented Jun 2, 2016

watchman 4.5--------close Deco will be ok

@austinkelleher
Copy link

+1 getting this with watchman 4.5.0

@mustafakucuk
Copy link

My problem is solved

brew uninstall watchman
brew link pcre
brew install --HEAD watchman

Thanks @mihriminaz;

@npomfret
Copy link
Contributor

npomfret commented Jul 2, 2016

Non of these solutions are working for me. Using watchman v4.6.0

@dovy
Copy link

dovy commented Sep 14, 2016

brew uninstall watchman
brew link pcre
brew install --HEAD watchman

Worked for me as well. Seemed like pcre needed an update.

@karna41317
Copy link

if u are using DECO, close it and run the app again -- worked for me

@s2zaman
Copy link

s2zaman commented Nov 16, 2016

I uninstalled and then installed the watchman

Got solution from hint provided by amonmoce ; helped me completely :)
#2941 (comment)

I followed andruschka and mihriminaz, but use the command with sudo, it will surely solve it.
Thanks buddies, you saved me hours and days 👍

@encodi
Copy link

encodi commented Dec 16, 2016

I used the solution of uninstalling it and reinstalling it with --HEAD using brew and it worked fine. Thanks!

@rishabh7257
Copy link

rishabh7257 commented Jan 13, 2017

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

@Thanakorn-ki
Copy link

Thanakorn-ki commented Mar 15, 2017

@+1 for linux

@jzhen
Copy link

jzhen commented Mar 25, 2017

+1 for closing Deco.

@TGrooves-208
Copy link

I had the same errors and it had to do with me downloading Deco. I deleted it and everything seems to be working fine now using. watchman 4.5.0

@JulianKingman
Copy link

This happened to me after migrating to a new laptop. Long story short, all my files had the wrong owner UID, running this on my home folder fixed this particular issue: sudo chown -R 501 ~, where 501 is your UID.

@negativeentropy9
Copy link

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.

@BryanCrotaz
Copy link

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 reboot

@Benzer1406
Copy link

Same error on macOS High Sierra with watchman 4.9.0. Tried all proposed solutions!

@chenhaibo
Copy link

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.

@mylonasg88
Copy link

mylonasg88 commented Apr 30, 2018

watchman -v => 4.9.0
I tried (which did not make any difference):

npm r -g watchman
brew update && brew upgrade
brew install watchman

And then:

$ sudo chown -R $(whoami):admin /usr/local/var

That solved it for me!

@DevJett
Copy link

DevJett commented Jul 12, 2018

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

@ghost
Copy link

ghost commented Jul 17, 2018

I use the solution with @mylonasg88 and @liamm12 .
It's worked for me.
My watchman version is 4.9.0.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests