Rishabh Joling
Rishabh Joling

Reputation: 21

Unable to start react-native start

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

Upvotes: 1

Views: 3185

Answers (2)

Massaynus
Massaynus

Reputation: 452

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

Upvotes: 0

Hardik Virani
Hardik Virani

Reputation: 1755

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

Upvotes: 2

Related Questions