Ionic serve RangeError: Maximum call stack size exceeded

After installing a new bower package in my previously working app, I’m getting an error with ionic serve.

The command & output is:

$ ionic serve -w Google\ Chrome -c -s --nogulp
Running live reload server: undefined
Watching: 0=www/**/*, 1=!www/lib/**/*
Live Reload failed to start, error: RangeError: Maximum call stack size exceeded
Ionic serve failed - error: RangeError: Maximum call stack size exceeded

The bower installation command:

$ bower install --save --save-exact

Uninstalling the bower package eliminates the problem (ionic serve resumes working as expected).

I’ve installed the cordova plugins required by the package.

I have not added a <script> tag for this package to index.html.

Is there a log or debug feature for ionic serve to get more details on what code is causing the problem?

Ah… There’s an app under the test directory.

Removing that directory appears to solve the problem. Not meant to be installed with bower, perhaps.

I don’t understand your solution; you removed a specific plugin and the range error disappered? I do not have this plugin installed yet Ive still got the max callstack error whenever I do ionic serve. I cannot figure out what I did that makes this error happen; the other dev on my project doesnt get this error when he refreshes his repo and does ionic serve on his machine.

In my case, the error appeared immediately after I ran the bower install , so I strongly suspected it was related to that.

The solution wasn’t exactly removing a plugin. It was removing a directory under the package that I had installed.

This directory contained a demo Cordova app for the package. I suspect that ionic serve – or maybe live reload – was trying to serve that demo app also (maybe causing some recursion).

I don’t have any thoughts about what’s causing the problem in your case… It sounds as though there’s a difference between your repo and the other dev’s repo.