Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!