Error: listen EADDRINUSE :::8080
See original GitHub issueHi everyone 😃 Quick question, how can I add more tests that need to connect to DB similar to the model/post.spec.js?
I keep getting a
1. Uncaught Exception
Error: listen EADDRINUSE :::8080
Object.exports._errnoException (util.js:1026:11)
exports._exceptionWithHostPort (util.js:1049:20)
every time I try to add a new spec file that has the code below in it.
test.beforeEach('connect to database', t => {
connectDB(t, () => {
console.log('connected to DB for account tests');
});
});
test.afterEach.always(t => {
dropDB(t);
});
Any suggestions/ideas? Thank you 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
How to fix Error: listen EADDRINUSE while using NodeJS?
EADDRINUSE means that the port(which we try to listen in node application) is already being used.
Read more >Error listen EADDRINUSE while using nodejs - Edureka
Hello @kartik,. EADDRINUSE means that the port number which listen() tries to bind the server to is already in use. So, in your...
Read more >How to kill server when seeing “EADDRINUSE: address ...
When this EADDRINUSE issue has already happened, in order to resolve it, you need to kill the process manually. In order to do...
Read more >How to find and terminate a Windows Processes by Port
Learn how to locate the Windows Process occupying a specific port and terminate it when you get an "error listen eaddrinuse: address already...
Read more >listen EADDRINUSE :::8080 · Issue #995 · MichMich/MagicMirror
Hi.. i have a little problem. but it works. node serveronly/ Starting MagicMirror: v2.1.2 Loading config ... Loading module helpers .
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
@panvourtsis I know this is over a year late, but I just ran into this issue and solved it. The tests are running in parallel and both trying to spin up a DB on the same port. You need to run them serially by adding the
--serial
flag to thetest
command inpackage.json
.Hopefully that helps someone else.
@Fallenstedt yes i know what it means. The thing is that when you got more than one test in place for the models this happens in whatever port you define. It just starting the next test without closing the usage of the port. Tried 8080, 4350, 6565 etc etc always the same