1

I'm getting below message from terminal while trying to run "react-native start" command.

Loading dependency graph...internal/fs/watchers.js:170
    throw error;

Error: ENOSPC: no space left on device, watch '/home/junior/ReactNative/ToDoList/android/gradle'
    at FSWatcher.start (internal/fs/watchers.js:164:26)
    at Object.watch (fs.js:1232:11)
    at NodeWatcher.watchdir (/home/junior/ReactNative/ToDoList/node_modules/sane/src/node_watcher.js:159:22)
    at Walker.<anonymous> (/home/junior/ReactNative/ToDoList/node_modules/sane/src/common.js:109:31)
    at Walker.emit (events.js:182:13)
    at /home/junior/ReactNative/ToDoList/node_modules/walker/lib/walker.js:69:16
    at go$readdir$cb (/home/junior/ReactNative/ToDoList/node_modules/graceful-fs/graceful-fs.js:162:14)
    at FSReqWrap.oncomplete (fs.js:141:20)

First screenshot displays emulator screen when I run "$react-native run-android" cmd

Second pic is screenshot when I reloaded the app by double pressing R

AsthaUndefined
  • 1,111
  • 1
  • 11
  • 24
  • Your device doesn't have enough space to run the app. clear some data (free some memory) and run again – Rutvik Bhatt Nov 16 '18 at 04:16
  • There is another post on this [enter link description here](https://stackoverflow.com/questions/22475849/node-js-what-is-enospc-error-and-how-to-solve) – idimma Nov 16 '18 at 07:09

2 Answers2

2

In android some time you need to first Start Metro Bundler manually!

Start Metro Bundler directly in terminal

react-native start

Now run react-native run-android or react-native run-ios in another tab

and yes if you getting some error like Error: ENOSPC: no space left on device, watch '/home/junior/ReactNative/ToDoList/android/gradle' at FSWatcher.start (internal/fs/watchers.js:164:26) at Object.watch (fs.js:1232:11) at NodeWatcher.watchdir (/home/junior/ReactNative/ToDoList/node_modules/sane/src/node_watcher.js:159:22) at Walker. (/home/junior/ReactNative/ToDoList/node_modules/sane/src/common.js:109:31) at Walker.emit (events.js:182:13) at /home/junior/ReactNative/ToDoList/node_modules/walker/lib/walker.js:69:16 at go$readdir$cb (/home/junior/ReactNative/ToDoList/node_modules/graceful-fs/graceful-fs.js:162:14) at FSReqWrap.oncomplete (fs.js:141:20) then you need to delete your current emulator and create new one with additinal spaces,

and if you getting anyting wrong in your terminal then you can reset your npm data as well

Clean cache

rm -rf $TMPDIR/react-*; rm -rf $TMPDIR/haste-*; rm -rf $TMPDIR/metro-*; watchman watch-del-all

Community
  • 1
  • 1
Hardik Virani
  • 1,687
  • 7
  • 23
  • 36
0

Try running npm install -g react-native and try afterwards

Massaynus
  • 322
  • 2
  • 9