I am getting this exception all of a sudden with the starter project installing all of the latest stuff.
Setup
ionic start great blank
/Users/pbrack/dev/temp/great:ionic info
cli packages: (/Users/pbrack/.nvm/versions/node/v8.2.1/lib/node_modules)
@ionic/cli-utils : 1.10.1
ionic (Ionic CLI) : 3.10.1
local packages:
@ionic/app-scripts : 2.1.4
Ionic Framework : ionic-angular 3.6.1
System:
Node : v8.2.1
npm : 5.3.0
OS : macOS Sierra
/Users/pbrack/dev/temp/great:
Error I am getting
[18:46:37] sass finished in 961 ms
[18:46:37] postprocess started ...
[18:46:37] postprocess finished in 5 ms
[18:46:37] lint started ...
[18:46:37] build dev finished in 8.75 s
[18:46:37] watch ready in 8.79 s
[18:46:37] dev server running: http://localhost:8100/
[INFO] Development server running!
Local: http://localhost:8100
External: http://10.210.108.20:8100, http://169.254.53.88:8100
[18:46:39] lint finished in 1.73 s
events.js:182
throw er; // Unhandled 'error' event
^
Error: send EHOSTUNREACH 169.254.255.255:41234
at Object.exports._errnoException (util.js:1024:11)
at exports._exceptionWithHostPort (util.js:1047:20)
at SendWrap.afterSend [as oncomplete] (dgram.js:474:11)
/Users/pbrack/dev/temp/great:
[14:23:22] build dev finished in 8.57 s
[14:23:22] watch ready in 8.61 s
[14:23:22] dev server running: http://localhost:8100/
[INFO] Development server running!
Local: http://localhost:8100
[14:23:24] lint finished in 2.64 s
events.js:182
throw er; // Unhandled 'error' event
^
Error: send EHOSTUNREACH 169.254.255.255:41234
at Object._errnoException (util.js:1041:11)
at _exceptionWithHostPort (util.js:1064:20)
at SendWrap.afterSend [as oncomplete] (dgram.js:474:11)
`ionic info`
By simply unplugging my iPhone from my Mac and then running ionic serve again fixed the problem.
It appears that ionic serve listens on all network interfaces which was causing a problem when my iPhone was plugged into my Mac. Mac uses the en5 interface to access the internet when tethered to your iPhone via a USB cable).
Type ifconfig from bash and look for interface en5. Specifically the ‘broadcast’ address.
This was fixed (actually the error was just hidden as this feature is not used yet and the app didn’t crash, it only output this useless error in the console…) in Ionic CLI 3.10.3 and should not be a problem any more.