Error when running watchman

后端 未结 6 758
情书的邮戳
情书的邮戳 2020-12-15 08:49

When I run react-native start, I am getting the following message

Error: A non-recoverable condition has triggered. Watchman needs your help! The trigg

相关标签:
6条回答
  • 2020-12-15 09:20

    You can solve it by trying one of the below solutions:

    first pass hit line of code in your terminal and test it :

    echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches  && echo 999999 | sudo tee -a  /proc/sys/fs/inotify/max_queued_events && echo 999999 | sudo tee  -a /proc/sys/fs/inotify/max_user_instances && watchman  shutdown-server
    

    or try to use "react-native run-android" or "run-ios" in the root of your project and then (in other terminal) "react-native start"

    otherwise perhaps the debugger page was left open from previous sessions. Closing the tab completely and then opening the debugger in a new tab solved the issue.

    if none of the above solution doesn't work with you try to restart your PC

    0 讨论(0)
  • 2020-12-15 09:25
    echo 256 | sudo tee -a /proc/sys/fs/inotify/max_user_instances
    echo 32768 | sudo tee -a /proc/sys/fs/inotify/max_queued_events
    echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
    

    watchman shutdown-server

    This one helped

    0 讨论(0)
  • 2020-12-15 09:26

    updating

    watchman

    to latest(4.7.0) version helped me solve this problem.

    0 讨论(0)
  • 2020-12-15 09:29

    Increase inotify limit to increase the limit on the number of files you can monitor.

    $ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
    $ sudo sysctl -p
    

    Please go through this for more info

    0 讨论(0)
  • 2020-12-15 09:35

    This One is Also Helpfull .

    echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches  && echo 999999 | sudo tee -a  /proc/sys/fs/inotify/max_queued_events && echo 999999 | sudo tee  -a /proc/sys/fs/inotify/max_user_instances && watchman  shutdown-server
    
    0 讨论(0)
  • 2020-12-15 09:41

    Just run these commands in terminal:

    echo 256 | sudo tee -a /proc/sys/fs/inotify/max_user_instances
    echo 32768 | sudo tee -a /proc/sys/fs/inotify/max_queued_events
    echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
    watchman shutdown-server  
    

    Other Way make Script in package.json

    "scripts": {
        "start": "node node_modules/react-native/local-cli/cli.js start",
        "test": "jest",
        "flow": "flow",
        "flow-stop": "flow stop",
        "watch-need-help": "echo 256 | sudo tee -a /proc/sys/fs/inotify/max_user_instances && echo 32768 | sudo tee -a /proc/sys/fs/inotify/max_queued_events && echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches && watchman shutdown-server"
      },
    

    Run following command on Terminal in project directory

    npm run watch-need-help
    
    0 讨论(0)
提交回复
热议问题