美文网首页React Native开发经验集
watchman--no-pretty get-sockname

watchman--no-pretty get-sockname

作者: 大掌柜88 | 来源:发表于2017-06-02 15:11 被阅读0次

    现象:iOS app启动的时特别慢,需要半分钟,在terminal中可以看到watchman的错误信息

    1、

    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、(/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.

    (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)

    或者:

    2、Watchman:  watchman--no-pretty get-sockname returned with exit code 1  ...... NO such file

    ....

    at ChildProcess ....

    at emitTwo ....

    .....

    解决办法:

    npm r -g watchman

    brew update && brew upgrade

    brew uninstall watchman

    brew link pcre

    brew install --HEAD watchman

    如果遇到权限问题  使用命令 sudo chown -R $(whoami):admin /usr/local

    参考:github.com/facebook/react-native/issues/2941

    相关文章

      网友评论

        本文标题:watchman--no-pretty get-sockname

        本文链接:https://www.haomeiwen.com/subject/bilufxtx.html