react-native icon indicating copy to clipboard operation
react-native copied to clipboard

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

Open sreejith-m-sreedharan opened this issue 11 years ago • 44 comments

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

sreejith-m-sreedharan avatar Sep 22 '15 17:09 sreejith-m-sreedharan

+1

andruschka avatar Sep 22 '15 20:09 andruschka

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

bitQ2019 avatar Sep 23 '15 04:09 bitQ2019

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

mkonicek avatar Sep 23 '15 18:09 mkonicek

+1 occurs with 3.7.0 and 3.8.0

aroth avatar Sep 23 '15 18:09 aroth

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

andruschka avatar Sep 23 '15 19:09 andruschka

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

farzd avatar Sep 23 '15 19:09 farzd

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

andruschka avatar Sep 23 '15 19:09 andruschka

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.

sreejith-m-sreedharan avatar Sep 25 '15 19:09 sreejith-m-sreedharan

This fixed it for me:

brew update && brew upgrade brew install watchman

danoctavian avatar Oct 04 '15 01:10 danoctavian

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

Ahrengot avatar Oct 04 '15 09:10 Ahrengot

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!

3210jr avatar Oct 29 '15 10:10 3210jr

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)

mihriminaz avatar Nov 03 '15 14:11 mihriminaz

awesome thanks!!

philopian avatar Mar 01 '16 04:03 philopian

Same problem with watchman 4.5.0

Alexintosh avatar May 15 '16 09:05 Alexintosh

same problem with watchman 4.5.0

zachzhao1984 avatar May 26 '16 05:05 zachzhao1984

same problem with watchman 4.5.0

karna41317 avatar May 26 '16 10:05 karna41317

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

Gagege avatar May 26 '16 14:05 Gagege

same with watchman 4.5.0 plz fix

theobouwman avatar May 27 '16 09:05 theobouwman

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

pycal avatar May 27 '16 18:05 pycal

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

amonmoce avatar May 28 '16 18:05 amonmoce