Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

84
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda