LoginSignup
8
3

More than 3 years have passed since last update.

React Native Error: System limit for number of file watchers reached

Last updated at Posted at 2019-07-19

React Native Error: System limit for number of file watchers reached

いつものようにyarn startでReactNativeアプリケーションを立ち上げるとこんなエラーが出た。あ〜も〜ReactNativeアプリをイチから再構築か?と諦めながら検索したらどちらかというとubuntuの問題であった。簡単な解決方法。しかしマイubuntuでいろいろ開発してるけどなぜにReactNativeで?の疑問は残る・・・

原因

システムによってモニタリングされているファイルが上限を超えた。

解決方法

$ sudo gedit /etc/sysctl.conf

でsysctl.confを開いて、ファイルの最終行に以下の一文を追加

fs.inotify.max_user_watches=524288

そしたら保存。

そしたら次のコマンドで確認。
sudo sysctl -p

以下のように出力されるはず。

$ sudo sysctl -p
fs.inotify.max_user_watches = 524288

これで無事にyarn startできた。



参考:React Native Error: ENOSPC: System limit for number of file watchers reached


8
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
3