Questions tagged [gulp-4]

use this tag for specific issues about Gulp version 4 or upgrading to version 4; use the [gulp] tag for general gulp issues

Gulp version 4

gulp is a toolkit that helps you automate painful or time-consuming tasks in your development workflow.

Github project: https://github.com/gulpjs/gulp/tree/4.0

Upgrade instructions: https://codeburst.io/switching-to-gulp-4-0-271ae63530c0

Guide to Upgrading to Gulp 4: https://www.joezimjs.com/javascript/complete-guide-upgrading-gulp-4/

115 questions
3
votes
1 answer

Gulp 4 watch not working, only run one time

I changed from Gulp 3 to Gulp 4, but I can't get it to work. When I run gulp and save SCSS or HTML file it creates a new file successfully. If I save again nothing happens. It only runs ones. Below is my gulpfile.js 'use strict'; var gulp =…
user11002481
3
votes
1 answer

Gulp 4 php with browserSync

I am new to gulp-4. I try run gulp js with php, browserSync it doesn't work? All other task work but php and browserSync not work at all. it's not open with browser anything is here wrong? is it possible to use with php with browserSync or any…
3
votes
1 answer

How to make Gulp 4 not to run a single task multiple times?

I have two tasks. They have a common task which should be executed before the tasks. With Gulp 3 I implement them this way: gulp.task('compile', () => { // Compiling the TypeScript files to JavaScript and saving them on…
Finesse
  • 9,793
  • 7
  • 62
  • 92
2
votes
1 answer

How to use gulp.series in gulp 4?

Have a super simple gulp file where I want to run some basic gulp tasks in sequence one after the other. I can't seem to get this running in Gulp v4. Had something similar in Gulp v3 using run-sequence instead of gulp.series() const gulp =…
user805703
  • 207
  • 6
  • 14
2
votes
1 answer

How stop gulp after doing the task?

I need help, I use gulp4 and have a task build scss: export const Style = () => src(path.style.src) .pipe(sourcemaps.init()) .pipe(postcss([ require('postcss-nested'), require('autoprefixer') ], {syntax:…
2
votes
0 answers

Two gulp 4 tasks run separately but don't work inside gulp.series()

I'm experimenting with gulp-4 and got stuck with a problem: I have files similar to .vue and have 2 tasks: gulp.task('precompile', () => { return…
eonae
  • 21
  • 1
2
votes
1 answer

Task never defined: Moving from gulpV3 to gulpV4

I've had to upgrade an old project from gulp version 3.9.1 to gulp version 4 which required me to rewrite my tasks. I've followed the documentation for moving to gulp.series and moving to name functions but I am now still getting errors on run.…
whatiscode
  • 45
  • 7
2
votes
1 answer

Error with converting gulp scripts from V3 to V4

I am updating to gulp4 from 3.9.1 on an old project. Due to the upgrade I've had to rewrite the tasks as per the documentation. I've switched to name functions and I am using gulp.series but I am getting errors such as: AssertionError…
whatiscode
  • 45
  • 7
2
votes
1 answer

Gulp v4 SFTP file deployment

Currently I am using "vinyl-ftp" for deployment. But this is not working with SFTP connections. What you guys are using for SFTP connection with Gulp 4?
Zaman
  • 71
  • 2
  • 6
2
votes
1 answer

Gulp 4 watch doesn't detect changes

Is it possible with gulp v.4.0.0 to watch for files outside of the folder where gulpfile.js is located? In older gulp it was possible to set file path to ../../someFile.css and watch for its changes, but in v4 it doesn't detect changes for the same…
Vladimir Jovanović
  • 3,288
  • 1
  • 20
  • 27
2
votes
1 answer

Gulp 4 glob to exclude specific files and folders not working

I recently installed gulp 4 [from 3.9.1] and I'm having an issue getting my globs to work as they used to. I have a whole directory [less some other sub-directories and files] that I want to transfer. Here's the relevant code: var path_in_str =…
ObiHill
  • 11,448
  • 20
  • 86
  • 135
2
votes
1 answer

Gulp 4 browsersync does not refresh when changing .less file

Link to Github repo: https://github.com/Greatshock/Netcracker-Study-Course/blob/f9bfb413929feec51064a78abf1450845f867186 I have a file named base.less, where all the styles are @import-ed. When I run the gulpfile (npm run dev), everything is being…
2
votes
1 answer

Gulp 4 multiple tasks on same source and in series

I edit my gulpfile like below: gulp.task('watch', function() { gulp.watch('**/*.html', gulp.series('htmlcomb')); gulp.watch('css/**/*.scss', gulp.series('csscomb')); gulp.watch('css/**/*.scss', gulp.series('cssmin')); …
Gulper
  • 21
  • 1
  • 2
2
votes
1 answer

Gulp 4 browserSync in parallel with Pug and Parceljs Tasks in series

So basically what I'm trying to do is to make the browser refresh whenever there is a change in the files using browserSync, compiles Pug templates, then Parceljs does the bundling. And Gulp is to watch for changes. The overall objective is a static…
Seif Sgayer
  • 268
  • 2
  • 13
2
votes
1 answer

How to install Gulp v4 with NPM v5?

I've installed the new version of npm but now when I try to run the next command the dependency doesn't install: npm i -S gulpjs/gulp#4.0 npm ERR! code ETARGET npm ERR! notarget No matching version found for undefined@4.0 npm ERR! notarget In most…
AlbertoFdzM
  • 1,023
  • 11
  • 24