Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

85
Vistas
Gulp hangs after executing tasks

I'm figuring out how gulp is working; it looks like the gulp tasks are being executed, but then it hangs.

Environment:

node version v14.17.0.

gulp:

CLI version: 2.3.0 Local version: 4.0.2


const babel = require("gulp-babel");

task("js",()=>{
    return src("src/*.js").pipe(babel()).pipe(dest("dist/js"));
})
task("moveHTML",()=>{
    return src("src/*.html").pipe(dest("dist"));
});
task("watch",()=>{
    watch("src/*.js",series("js"));
});
task("default",series('moveHTML','js','watch'));

There is no error here, but the execution is hanging. below is the node terminal message:


[10:30:29] Starting 'default'...

[10:30:29] Starting 'moveHTML'...

[10:30:29] Finished 'moveHTML' after 85 ms

[10:30:29] Starting 'js'...

[10:30:32] Finished 'js' after 3.22 s

[10:30:32] Starting 'watch'... 
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The process persists because you are calling gulp.watch which returns an instance of chokidar and by default keeps the node process running.

If you want to stop the node process use the persistent option and set it to false.

watch("src/*.js", { persistent: false }, series("js"));

However, the gulp docs suggest not to do this.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda