Answer the question
In order to leave comments, you need to log in
Error: listen EADDRINUSE: address already in use :::3000?
This error appeared.
Earlier, as a protection, I found such a hack, insert into the package.json script
"predev": "fuser -k 3000/tcp && echo 'Terminated' || echo 'Nothing was running on the 3000'",
async function start() {
process.once("SIGUSR2", function () {
process.kill(process.pid, "SIGUSR2");
});
const nuxt = await loadNuxt(isDev ? "dev" : "start");
app.use(nuxt.render);
if (isDev) {
build(nuxt);
}
app.listen(PORT);
}
// Запуск приложения.
start();
Answer the question
In order to leave comments, you need to log in
The decision came by itself.
If you make any changes to the files on the server again 10 seconds after the error occurs, the error will disappear.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question