Error Serving basic ionic 2 unmodified tab starter template


#1

My current setup:
Ionic 2.1.13
Cordova 6.4.0
Node: 7.2.0
NPM: 4.0.3
OS: Windows 10

When I run ionic serve -l in the directory where the unmodified starter template is installed I get the following error. Any ideas/suggestions? Thanks

> ionic-app-scripts serve "-l"
> [16:36:55]  ionic-app-scripts 0.0.45
> [16:36:55]  watch started ...
> [16:36:55]  build dev started ...
> [16:36:55]  clean started ...
> [16:36:55]  clean finished in less than 1 ms
> [16:36:55]  copy started ...
> [16:36:55]  transpile started ...
> events.js:160
>       throw er; // Unhandled 'error' event
>       ^

> Error: listen EADDRINUSE 0.0.0.0:8100
>     at Object.exports._errnoException (util.js:1022:11)
>     at exports._exceptionWithHostPort (util.js:1045:20)
>     at Server._listen2 (net.js:1262:14)
>     at listen (net.js:1298:10)
>     at doListening (net.js:1397:7)
>     at _combinedTickCallback (internal/process/next_tick.js:77:11)
>     at process._tickCallback (internal/process/next_tick.js:98:9)
>     at Module.runMain (module.js:607:11)
>     at run (bootstrap_node.js:420:7)
>     at startup (bootstrap_node.js:139:9)

> npm ERR! Windows_NT 10.0.14393
> npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin" "ionic:serve" "--" "-l"
> npm ERR! node v7.2.0
> npm ERR! npm  v4.0.3
> npm ERR! code ELIFECYCLE
> npm ERR! ionic-hello-world@ ionic:serve: `ionic-app-scripts serve "-l"`
> npm ERR! Exit status 1

#2

I don’t know what the Windows equivalent of lsof is, but you need to figure out what is listening on port 8100 and kill it, or tell ionic serve to use a different port with the -p command line option.


#3

Thanks. Yeah worked that out.

I got it to work with the following command:
ionic serve -p 8101 -l

Now how do I work out what is running on port 8100?! hmmm