ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Ionic Serve Failed

Open neerav94 opened this issue 10 years ago • 8 comments

Caught exception: Error: watch /home/user_name/ionic_learn/ionic-maps/node_modules/@angular/compiler/src/animation/styles_collection.js ENOSPC at exports._errnoException (util.js:1008:11) at FSWatcher.start (fs.js:1429:19) at Object.fs.watch (fs.js:1456:11) at createFsWatchInstance (/home/username/ionic_learn/ionic-maps/node_modules/chokidar/lib/nodefs-handler.js:37:15) at setFsWatchListener (/home/username/ionic_learn/ionic-maps/node_modules/chokidar/lib/nodefs-handler.js:80:15) at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/username/ionic_learn/ionic-maps/node_modules/chokidar/lib/nodefs-handler.js:228:14) at FSWatcher.NodeFsHandler._handleFile (/home/username/ionic_learn/ionic-maps/node_modules/chokidar/lib/nodefs-handler.js:255:21) at FSWatcher. (/home/username/ionic_learn/ionic-maps/node_modules/chokidar/lib/nodefs-handler.js:473:21) at FSReqWrap.oncomplete (fs.js:123:15)

Live Reload failed to start, error: Error: watch /home/username/ionic_learn/ionic-maps/www/build ENOSPC Ionic serve failed - error: Error: watch /home/username/ionic_learn/ionic-maps/www/build ENOSPC

neerav94 avatar Jul 28 '16 19:07 neerav94

I also got this error when running ionic serve -c -l. However, when I restart--or sometimes when I open a new terminal window--ionic serve will work properly.

mfscheidler avatar Jul 28 '16 20:07 mfscheidler

hi guys, this issue was resolved ? because i can't start my serve here, he says

Caught exception: Error: watch /home/guilherme/SchoolOfNet/Ionic+Pagseguro/ionic/demo/node_modules/@angular/compiler/src/html_ast.js ENOSPC at exports._errnoException (util.js:1012:11) at FSWatcher.start (fs.js:1429:19) at Object.fs.watch (fs.js:1456:11) at createFsWatchInstance (/home/guilherme/SchoolOfNet/Ionic+Pagseguro/ionic/demo/node_modules/chokidar/lib/nodefs-handler.js:37:15) at setFsWatchListener (/home/guilherme/SchoolOfNet/Ionic+Pagseguro/ionic/demo/node_modules/chokidar/lib/nodefs-handler.js:80:15) at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/guilherme/SchoolOfNet/Ionic+Pagseguro/ionic/demo/node_modules/chokidar/lib/nodefs-handler.js:228:14)

vinimarcili avatar Aug 01 '16 20:08 vinimarcili

I hit the same problem. It is working on my other Ubuntu 16.04 laptop but when I did the following on my Ubuntu 16.04 Mate desktop:

git pull
npm install -g ionic@beta cordova
npm install
ionic serve

Then I get the ENOSPC problem with the watcher. The problem seems to be caused by the watcher exceeding the number of files it can watch. To fix the problem, you need to increase the number of files the OS will allow you to watch. In linux the command is:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

This will resolve the problem

leommoore avatar Aug 19 '16 09:08 leommoore

Thanks!! @leommoore, It works for me. I have found the same solution on the following link. click here

devendrachhaiya avatar Sep 08 '16 09:09 devendrachhaiya

Thanks @leommoore i faced the same and it worked. :)

ksaikiranr avatar Feb 17 '17 13:02 ksaikiranr

the problem is the number of watches . I resolve with this command : echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

pedrocoder avatar Mar 21 '17 02:03 pedrocoder

Since this is a valid solution, you might want to close the issue.

lgleim avatar Mar 22 '17 14:03 lgleim

@leommoore thank <3

lieunttuit avatar Dec 27 '17 06:12 lieunttuit