Error when running watchman

后端 未结 6 762
情书的邮戳
情书的邮戳 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: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
    

提交回复
热议问题