6

This is my first attempt at running react-native project. Followed all the instructions mentioned at react-native side. and ran 'npm start' Getting below error in command prompt :

     ERROR  watchman--no-pretty get-sockname returned with exit code null dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib
  Referenced from: /usr/local/bin/watchman
  Reason: image not found

Error: watchman--no-pretty get-sockname returned with exit code null dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib
  Referenced from: /usr/local/bin/watchman
  Reason: image not found

    at ChildProcess.<anonymous> (/Users/z013mrq/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:818: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)
Abhijeet Mishra
  • 443
  • 4
  • 13

1 Answers1

13

Try reinstalling watchman:

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

If that doesn't fix it, try the answers posted here.

Try to re-install libtool by:

brew reinstall libtool --universal && brew unlink libtool && brew link libtool

If won't help, try to remove it completely and re-try above again:

brew uninstall libtool

Community
  • 1
  • 1
Adam Terlson
  • 12,610
  • 4
  • 42
  • 63
  • 1
    Same issue on Linux; instead of brew, install it from the official git. Instructions are in Facebook's *Getting Started* guide. – Toerndev May 14 '16 at 08:08