0

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 ?

Romain Bruckert
  • 2,546
  • 31
  • 50

1 Answers1

2

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.

Romain Bruckert
  • 2,546
  • 31
  • 50