Async example: Error: connect ECONNREFUSED 127.0.0.1:80
See original GitHub issueHI , I’m on the window 7, when i run npm test
in examples/async
, it produced errors below:
$ npm test
> @ test D:\study\jest\examples\async
> jest
RUNS __tests__\user-test.js
events.js:160
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 127.0.0.1:80
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)
npm ERR! Test failed. See above for more details.
then, I checked the 80 port, but found nothing:
Administrator@USER-20150722FJ D:\study\jest\examples\async
$ netstat -ano | findstr "127.0.0.1:80"
Issue Analytics
- State:
- Created 7 years ago
- Reactions:10
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Jest test passed but get Error: connect ECONNREFUSED ...
So I figured out and the solution is quite easy. I can't explain why though. This req.get('api/v1/users/') should be /api/v1/users - you ...
Read more >Connect ECONNREFUSED 127.0.0.1:80 - Node
it was the index folder I have just named it app. However, I have figured out where the error was it just a...
Read more >connect econnrefused 127.0.0.1:80 - You.com | The AI Search ...
A lot of Error: Error: connect ECONNREFUSED 127.0.0.1:80 in the console logs when running my tests. But the tests pass most of the...
Read more >connect ECONNREFUSED 127.0.0.1:3306 solved in Node JS ...
How to fix Error : connect ECONNREFUSED 127.0.0.1:3306 in node js and mysql is shown.
Read more >connect ECONNREFUSED when integration testing a Node.js ...
Error : connect ECONNREFUSED when integration testing a Node.js app ... Turned out the root cause was a test method that should have...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dYb Did you run Jest with --no-cache once, or ran it for the first time with babel-jest > ‘9.0.3’? Which version of Node are you running?
I have this issue with all ^9.0.0 versions of babel-jest ( ‘9.0.1’, ‘9.0.2’, ‘9.0.3’). ‘10.0.1’ works and so does 16 and 17.
edit: tested here on a Windows 10 machine, babel-jest ^9.0.0 not working, 16 and 17 works fine.
@cpojer You’re right, this isn’t the issue, although it works somehow for me (I’m on OSX Sierra).
The example uses babel-jest ^9.0.0. Upgrading to 16.0.0 and running
jest --no-cache
once also solved the issue for me.