
まだコードを書く前からエラーだわ

なんて日だ!
エラー表示
nodejsのバージョンは、v12.18.3。react-nativeのバージョンは、0.63.2 です。
Code language: Bash (bash)$ node -v v12.18.3 $ react-native -v react-native-cli: 2.0.1 react-native: 0.63.2
react-native startしたら、次のエラーでした。
$ react-native start
(省略)
Failed to construct transformer: Error: ENOSPC: System limit for number of file watchers reached, watch '/xxx/yyy'
at FSWatcher.<computed> (internal/fs/watchers.js:218:26)
at Object.watch (fs.js:1474:34)
at NodeWatcher.watchdir (/xxx/yyy/node_modules/sane/src/node_watcher.js:159:22)
at new NodeWatcher (/xxx/yyy/node_modules/sane/src/node_watcher.js:43:10)
at createWatcher (/xxx/yyy/node_modules/jest-haste-map/build/index.js:1052:23)
at Array.map (<anonymous>)
at HasteMap._watch (/xxx/yyy/node_modules/jest-haste-map/build/index.js:1230:44)
at /xxx/yyy/node_modules/jest-haste-map/build/index.js:517:21
at Generator.next (<anonymous>)
at asyncGeneratorStep (/xxx/yyy/node_modules/jest-haste-map/build/index.js:193:24) {
errno: -28,
syscall: 'watch',
code: 'ENOSPC',
path: '/xxx/yyy',
filename: '/xxx/yyy'
}
Code language: Bash (bash)
対応方法
現在のfs.inotify.max_user_watches
の値を確認すると、8192でした。
$ cat /proc/sys/fs/inotify/max_user_watches 8192
/etc/sysctrl.conf
をテキストエディターで開きます。
$ sudo vim /etc/sysctrl.conf
最終行に、次の行を追加して、保存します。
fs.inotify.max_user_watches=65536
編集したファイルを再読込みします。
$ sudo sysctl -p fs.inotify.max_user_watches = 65536
fs.inotify.max_user_watches
の値を確認すると、設定した値 65536になっていました。
$ cat /proc/sys/fs/inotify/max_user_watches 65536
再度、react-native startしたところ、無事、起動しました。

ようやくコードを書けるわね
参考記事

Vue.js開発サーバー起動時のSystem limit for number of file watchers reachedエラー対応方法 - Qiita
書いてあること
Vue.js開発サーバーを起動した際ののSystem limit for number of file watchers reachedエラーの対応方法
環境
CentOS Linux release...