diff --git a/CHANGELOG.md b/CHANGELOG.md index 123f9fed..27378af4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - fixed CLI arguments for `--` separator - fixed sourcemap if range in a comment - added cache for sourcemap conversion + - fixed ECONNREFUSED on NodeJS 18 * 2.7.5 - fixed special generated codes for original coverage diff --git a/lib/utils/request.js b/lib/utils/request.js index abd9a8b9..82360516 100644 --- a/lib/utils/request.js +++ b/lib/utils/request.js @@ -1,5 +1,9 @@ const http = require('http'); const https = require('https'); +const dns = require('dns'); + +// fixed ECONNREFUSED on NodeJS 18 +dns.setDefaultResultOrder('ipv4first'); // minimal http request for get sourcemap json // https://nodejs.org/docs/latest/api/http.html#httprequesturl-options-callback