Wednesday, 17 May 2017

Node.js events.js: 163 throw er; when executing Jest with flag --runInBand

In our package.json we have added to our script test the --runInBand flag in order to speed up travis tests. We're 5 people in our team and all of them have no problems but I'm having this error every time I run the script. This is what's looks like:

events.js:163
  throw er; // Unhandled 'error' event
  ^

Error: connect EHOSTDOWN 169.254.169.254:80 - Local (192.168.8.46:63717)
    at Object.exports._errnoException (util.js:1050:11)
    at exports._exceptionWithHostPort (util.js:1073:20)
    at internalConnect (net.js:889:16)
    at lookupAndConnect (net.js:977:5)
    at Socket.realConnect (net.js:945:5)
    at Agent.connect [as createConnection] (net.js:77:22)
    at Agent.createSocket (_http_agent.js:195:26)
    at Agent.addRequest (_http_agent.js:157:10)
    at new ClientRequest (_http_client.js:212:16)
    at Object.request (http.js:26:10) 

The script:

"test": "export APP_ENV=development && jest --no-cache --runInBand --forceExit",

If I remove this flag, I don't get this error. I don't know if it's related to Jest, Node, Travis, etc but I have been looking to resolve it for a long time and I have no more ideas.

My version are:

  • Node: v7.10.0

  • Jest: v19.0.2

Thanks in advance.



via Albert Olivé

No comments:

Post a Comment