Ionic serve error after upgrading to 1.0.0-beta.12

I have updated Ionicframework using bower and now I get the following error, when running ionic serve. Please advise how to resolve this.

Running serve task…
Running dev server at http://0.0.0.0:8100
Running live reload server at http://0.0.0.0:35729

child_process.js:948
throw errnoException(process._errno, ‘spawn’);
^
Error: spawn EMFILE
at errnoException (child_process.js:1001:11)
at ChildProcess.spawn (child_process.js:948:11)
at exports.spawn (child_process.js:736:9)
at Object.exports.execFile (child_process.js:618:15)
at exports.exec (child_process.js:589:18)
at open (/usr/local/lib/node_modules/ionic/node_modules/open/lib/open.js:58:10)
at Server. (/usr/local/lib/node_modules/ionic/lib/ionic/serve.js:76:11)
at Server.g (events.js:180:16)
at Server.emit (events.js:92:17)
at net.js:1055:10

I’ve upgraded to beta 13 and get a different error now

$ ionic serve
Running serve task…

events.js:72
throw er; // Unhandled ‘error’ event
^
Error: EMFILE: Too many opened files.
at Gaze._handleError (/usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:436:31)
at Gaze._watchDir (/usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:302:17)
at /usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:358:10
at iterate (/usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5)
at /usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:61:11
at /usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:420:5
at iterate (/usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5)
at /usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:61:11
at /usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:420:5
at iterate (/usr/local/lib/node_modules/ionic/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5)

Try upgrade to beta13. I just did and it is working fine.

I’ve made a typo, upgraded to 13

That happend only in your current project or also happends when you use some startup examples?

Current project, new ones are fine

For anyone who would struggle with this issue:

I’ve solved it (Mac OSX 10.9.5) by setting a higher ulimit. (e.g. http://unix.stackexchange.com/questions/108174/how-to-persist-ulimit-settings-in-osx-mavericks )

Hope this helps.