Closed fluffynuts closed 4 years ago
You're using an outdated version of cacheable-lookup
: 4.1.2
. The newest is 4.2.3
.
Yep, the issue exists on 4.1.2
. Please update.
I'll raise an issue at got's repo. I'm not choosing this version - it's what's coming down with got.
Can you try cacheable-lookup@5.0.0
out? Thanks.
Tested on windows 10, node 12.16.2, via
got
127.0.0.1 server.dev.local
npm ci
npm start
test.bat
If you get
ENOTFOUND
for the second test and you're on windows, it may be because your hosts file has CRLF EOL. Change with dos2unix (get from scoop) and try again, until all calls passNow, with the api still running, update the hosts file -- delete the line from [2] or alter it, eg
196.25.1.1 server.dev.local
.Expected behavior: if deleting the line, I should get ENOENT, if altering to 196.25.1.1, then I expect an ECONNREFUSED (196.25.1.1 is a dns server for South Africa, iirc)
Actual behavior: even if I wait and retry in 30 seconds, the calls never fail until I restart the api. Then they consistently fail, even if I undo the changes to the system hosts file and wait.