Ionic1 Error: TypeError: Unable to read property 'emit'

advertisements

i am making a application using ionic1 and angularjs1.

Today, when i execute ionic serve command in terminal. then i got following error.

[email protected]:peoject$ ionic serve
[INFO] Starting server: --port=8100 --p=8100 --livereload-port=35729 --r=35729 --address=0.0.0.0 - Ctrl+C to cancel
TypeError: Cannot read property 'emit' of undefined

from last 2-3 months there was no any issue but today suddenly i faced with this issue.

My ionic version is 3.3.0

Is there anything update on ionic or what else? i dont understand.


I tried a lot and the solutions is very simple.

My previous version of ionic was 2.2.0

So, i downgrade the ionic version.

First, remove the ionic, then reinstall with your old version.

[email protected]: sudo npm uninstall -g ionic
[email protected]: sudo npm install -g [email protected]

or

[email protected]: sudo npm uninstall -g ionic
[email protected]: sudo npm install -g [email protected]

or

[email protected]: sudo npm uninstall -g ionic
[email protected]: sudo npm install -g [email protected]

Whatever the version is, just uninstall your latest ionic and install your old version.

Then the issue is solved.