Reputation: 2610
I am running an app with Ionic CLI 2.1.17. When i do ionic server --lab
for the first time, the app builds and works, but whenever i change some code, the CLI tries to rebuild on the fly but always throws the following error.
[12:17:51] build started ...
(node:10488) UnhandledPromiseRejectionWarning:
Unhandled promise rejection (rejection id: 1):
TypeError: Cannot read property 'send' of undefined
If i stop the CLI completely and run it again from the start, it works. Any idea of what might cause this very frustrating issue ?
Upvotes: 0
Views: 708
Reputation: 2610
I've found the solution. If you haven't opened localhost:8100/ionic-lab
, the server cant send data to the client via websockets (probably). So its neither a bug nor a ionic CLI error.
Upvotes: 2