S
S
Sergey2016-01-09 21:51:26
gulp.js
Sergey, 2016-01-09 21:51:26

Gulp-connect is blocking the port, what should I do?

gulp.task('server', function() {
  connect.server({
    port: 5555,
    root: 'build',
    livereload: true
  });
});

After stopping the task in the terminal and subsequent launches, it writes

Error: listen EADDRINUSE :::5555
at Object.exports._errnoException (util.js:855:11)
at exports._exceptionWithHostPort (util.js:878:20)
at Server._listen2 (net.js:1237:14)
at listen (net.js:1273:10)
at Server.listen (net.js:1369:5)
at ConnectApp.server (D:\hosting\OpenServer\domains\new-kater.ru\front\node_modules\gulp-connect \index.js:62:19)
at new ConnectApp (D:\hosting\OpenServer\domains\new-kater.ru\front\node_modules\gulp-connect\index.js:38:10)
at Object.module.exports .server (D:\hosting\OpenServer\domains\new-kater.ru\front\node_modules\gulp-connect\index.js:185:12)
at Gulp. (D:\hosting\OpenServer\domains\new-kater.ru\front\gulpfile.js:32:11)
at module.exports (D:\hosting\OpenServer\domains\new-kater.ru\front\node_modules\orchestrator\lib\runTask.js:34:7)

Do not constantly change the port

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2016-01-16
@Sergamers

It was decided by the correct setting of the server

A
Anton Zhukov, 2016-01-09
@MrCheater

connect.serverClose();
https://github.com/avevlad/gulp-connect Start and stop server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question