Ionic-cli: `ionic start` gives `RangeError [ERR_OUT_OF_RANGE]: The value of "err" is out of range.` error

Created on 22 Oct 2019  ·  5Comments  ·  Source: ionic-team/ionic-cli

Description:

Running ionic start throws the following error:

util.js:220
    throw new ERR_OUT_OF_RANGE('err', 'a negative integer', err);
    ^

RangeError [ERR_OUT_OF_RANGE]: The value of "err" is out of range. It must be a negative integer. Received 536870174
    at Object.getSystemErrorName (util.js:220:11)
    at exceptionWithHostPort (internal/errors.js:495:21)
    at internalConnect (net.js:907:16)
    at defaultTriggerAsyncIdScope (internal/async_hooks.js:301:12)
    at GetAddrInfoReqWrap.emitLookup [as callback] (net.js:1050:9)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:65:10) {
  code: 'ERR_OUT_OF_RANGE'

Steps to Reproduce & Output:

> ionic start

Every great app needs a name! 😍

Please enter the full name of your app. You can change this at any time. To bypass this prompt next time, supply name,
the first argument to ionic start.

? Project name: testApp

Pick a framework! 😁

Please select the JavaScript framework to use for your new app. To bypass this prompt next time, supply a value for the
--type option.

? Framework: Angular

Let's pick the perfect starter template! 💪

Starter templates are ready-to-go Ionic apps that come packed with everything you need to build your app. To bypass this
prompt next time, supply template, the second argument to ionic start.

? Starter template: tabs
✔ Preparing directory ./testApp - done!
⠹ Downloading and extracting tabs starter 
util.js:220
    throw new ERR_OUT_OF_RANGE('err', 'a negative integer', err);
    ^

RangeError [ERR_OUT_OF_RANGE]: The value of "err" is out of range. It must be a negative integer. Received 536870174
    at Object.getSystemErrorName (util.js:220:11)
    at exceptionWithHostPort (internal/errors.js:495:21)
    at internalConnect (net.js:907:16)
    at defaultTriggerAsyncIdScope (internal/async_hooks.js:301:12)
    at GetAddrInfoReqWrap.emitLookup [as callback] (net.js:1050:9)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:65:10) {
  code: 'ERR_OUT_OF_RANGE'
}

My ionic info:

[WARN] You are not in an Ionic project directory. Project context may be missing.

Ionic:

   Ionic CLI : 5.4.4

Utility:

   cordova-res : not installed
   native-run  : 0.2.9 

System:

   NodeJS : v12.12.0
   npm    : 6.11.3
   OS     : macOS Catalina

Other Information:

triage

Most helpful comment

Older versions of Node didn't fix it.

However, I realized I recently installed a LuLu, a firewall app. Even though it isn't blocking anything, it seems that by disabling it the problem is fixed!
Thanks for the lead! Hopefully this helps others who run into this issue as I didn't find any relevant issues when searching for the error.

All 5 comments

Are you behind a corporate network proxy?

Nope

Does using Node 10 make it work?

Older versions of Node didn't fix it.

However, I realized I recently installed a LuLu, a firewall app. Even though it isn't blocking anything, it seems that by disabling it the problem is fixed!
Thanks for the lead! Hopefully this helps others who run into this issue as I didn't find any relevant issues when searching for the error.

Yeah, unfortunately network proxies can yield lots of weird, incomprehensible errors. It's the first question I ask.

Glad you got it working!

Was this page helpful?
0 / 5 - 0 ratings