Ionic start error

  • I launched several ‘Ubuntu 20’ servers, and every time I’m getting the same error when starting ionic from ‘ionic start’.

  • It asks me whether I want to use the app creation wizard, and I type y, and proceed, then it get stuck there.

  • I tried with different other options, like to start in tabs app, and in react app etc… and it always freezes at some point. Never was able on any of my machines to get it to work.

  • I reinstalled nodejs, npm, tried with several older and newer versions of node and npm, and I tried installing @ionic/cli-latest even. I tried running ionic on several fresh machines as a user without root privileges, and even as root, nothing worked.

  • I installed Node 16, and tried with 17, and 12, and 10.

  • for npm I tried with 8.4, and 8.1.2, and 6.x

  • I tried the nvm method mentioned in one of the pages of ionic documentation.

  • This almost never happens when I use Reactjs or Nextjs or many other packages, as on the same machines I would add or remove these and run them without problems.

  • I ran

$ ionic start --verbose

to see what’s happening, and I got this:

ionic:utils-network checking for open port on 0.0.0.0:8123 +0ms
ionic:utils-network checking for open port on 127.0.0.1:8123 +7ms
ionic:utils-network checking for open port on ::1:8123 +1ms
ionic:utils-network checking for open port on 178.128.34.217:8123 +4ms
ionic:utils-network checking for open port on 10.16.0.6:8123 +1ms
ionic:utils-network checking for open port on fe80::c7f:61ff:fe61:7f8c:8123 +0ms
ionic:utils-network error while checking fe80::c7f:61ff:fe61:7f8c:8123: Error: listen EINVAL: invalid argument fe80::c7f:61ff:fe61:7f8c:8123 at Server.setupListenHandle [as _listen2] (net.js:1299:21) at listenInCluster (net.js:1364:12) at doListen (net.js:1501:7) at processTicksAndRejections (internal/process/task_queues.js:85:21) { code: ‘EINVAL’, errno: ‘EINVAL’, syscall: ‘listen’, address: ‘fe80::c7f:61ff:fe61:7f8c’, port: 8123 } +3ms
ionic:utils-network checking for open port on 10.106.0.3:8123 +2ms
ionic:utils-network checking for open port on fe80::3caa:edff:fed7:a269:8123 +1ms
ionic:utils-network error while checking fe80::3caa:edff:fed7:a269:8123: Error: listen EINVAL: invalid argument fe80::3caa:edff:fed7:a269:8123 at Server.setupListenHandle [as _listen2] (net.js:1299:21) at listenInCluster (net.js:1364:12) at doListen (net.js:1501:7) at processTicksAndRejections (internal/process/task_queues.js:85:21) { code: ‘EINVAL’, errno: ‘EINVAL’, syscall: ‘listen’, address: ‘fe80::3caa:edff:fed7:a269’, port: 8123 } +0ms

Thanks for any help.

I’m getting the same thing, also on Ubuntu 20 (running in a Parallels virtual machine)

ionic:utils-network checking for open port on 0.0.0.0:8123 +0ms
ionic:utils-network checking for open port on 127.0.0.1:8123 +4ms
ionic:utils-network checking for open port on ::1:8123 +0ms
ionic:utils-network checking for open port on 10.10.10.211:8123 +1ms
ionic:utils-network checking for open port on fe80::21c:42ff:fe39:bb12:8123 +2ms
ionic:utils-network error while checking fe80::21c:42ff:fe39:bb12:8123: Error: listen EINVAL: invalid argument fe80::21c:42ff:fe39:bb12:8123     at Server.setupListenHandle [as _listen2] (net.js:1303:21)     at listenInCluster (net.js:1368:12)     at doListen (net.js:1505:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EINVAL', errno: -22, syscall: 'listen', address: 'fe80::21c:42ff:fe39:bb12', port: 8123 } +2ms
ionic:utils-network checking for open port on 192.168.208.1:8123 +2ms
ionic:utils-network checking for open port on fe80::42:32ff:fe87:3bf1:8123 +1ms
ionic:utils-network error while checking fe80::42:32ff:fe87:3bf1:8123: Error: listen EINVAL: invalid argument fe80::42:32ff:fe87:3bf1:8123     at Server.setupListenHandle [as _listen2] (net.js:1303:21)     at listenInCluster (net.js:1368:12)     at doListen (net.js:1505:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EINVAL', errno: -22, syscall: 'listen', address: 'fe80::42:32ff:fe87:3bf1', port: 8123 } +0ms
ionic:utils-network checking for open port on fe80::c4b0:22ff:fe86:519:8123 +1ms
ionic:utils-network error while checking fe80::c4b0:22ff:fe86:519:8123: Error: listen EINVAL: invalid argument fe80::c4b0:22ff:fe86:519:8123     at Server.setupListenHandle [as _listen2] (net.js:1303:21)     at listenInCluster (net.js:1368:12)     at doListen (net.js:1505:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EINVAL', errno: -22, syscall: 'listen', address: 'fe80::c4b0:22ff:fe86:519', port: 8123 } +1ms
ionic:utils-network checking for open port on fe80::d84b:bcff:fe9a:4a09:8123 +1ms
ionic:utils-network error while checking fe80::d84b:bcff:fe9a:4a09:8123: Error: listen EINVAL: invalid argument fe80::d84b:bcff:fe9a:4a09:8123     at Server.setupListenHandle [as _listen2] (net.js:1303:21)     at listenInCluster (net.js:1368:12)     at doListen (net.js:1505:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EINVAL', errno: -22, syscall: 'listen', address: 'fe80::d84b:bcff:fe9a:4a09', port: 8123 } +1ms
ionic:utils-network checking for open port on fe80::2cb0:8dff:fec6:ae62:8123 +0ms
ionic:utils-network error while checking fe80::2cb0:8dff:fec6:ae62:8123: Error: listen EINVAL: invalid argument fe80::2cb0:8dff:fec6:ae62:8123     at Server.setupListenHandle [as _listen2] (net.js:1303:21)     at listenInCluster (net.js:1368:12)     at doListen (net.js:1505:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EINVAL', errno: -22, syscall: 'listen', address: 'fe80::2cb0:8dff:fec6:ae62', port: 8123 } +1ms

Did you ever manage to get sorted?