12,627 questions
Score of 0
0 answers
56 views
gulp : The following tasks did not complete: build, copy-css Did you forget to signal async completion?
in my first post, I was building gulp, but something happened that I didn't understand:
This is a bug :
[21:36:37] Using gulpfile I:\20250820\mvc\gulpfile.js
[21:36:37] Starting 'build'...
[21:36:37] ...
Score of 1
1 answer
144 views
Building sass with gulp - includePaths not having any effect
I am attempting to build a sass file that imports bootstrap from the node_modules folder.
I have added the bootstrap source folder to the includePath list.
But for some reason, the gulp compiler is ...
Score of 0
1 answer
115 views
How to integrate Vue.js 3 with SPFx 1.21.1?
I'm trying to develop my first SPFx (1.21.1) web part using Vue (3.5.22) without success. This is my package.json:
{
"name": "spfx",
"version": "0.0.1",
&...
Score of 1
0 answers
99 views
Is it possible to set up a gulp-based build to compile css modules for react components
I have an existing Express project where I'd like to add css modules locally scoped to my react components. The project relies on a gulp build script. I have recently added react to the project to ...
Score of 1
0 answers
69 views
NPX gulp generated sourcemaps keep changing line endings (CRLF vs LF)
I'm running into a recurring problem after running npx gulp to initiate the build process (scss -> css builds).
After each initialisation run,Git shows that a huge number of .css.map files have ...
Score of 0
0 answers
82 views
How to connect html-minifier-next to gulp
Unfortunately project page doesn't have documentation about how to connect html-minifier-next to gulp.
Search showed me one solution. I tried it.
...
const htmlMinify = require('html-minifier-next'); ...
Score of 1
1 answer
58 views
How handle the child process errors in Gulp?
The error in child process not always means that something fatal occurred.
For example in "vue-tsc" case, if there will be some TypeScript errors, the error parameter will be not null while &...
Score of 0
0 answers
135 views
After upgrading cordova environment, getting cannot run sass task missing in gulpfile.js
I have upgraded many components of my dev environment and I am now getting the following error when trying to compile my app. Everything was running fine before I started the upgrades, my app would ...
Score of 1
1 answer
393 views
autoprefixer is not a function
I have used this code on other projects with no problem.
For some reason, when running the clean_make_css, it comes back with an error
autoprefixer is not a function
I added a checker, checkFunc, ...
Score of 0
1 answer
67 views
Gulp changes reflects only on manual refreshing not automatically
I’m reaching out for some assistance regarding an issue I’ve encountered with my Gulpfile setup. I’ve configured the browser sync option in the file, and while changes are correctly getting reflected ...
Score of -1
1 answer
34 views
How to remove specific types of files from a gulp process
Within my gulpfile.js file, after my tasks run I would like to remove all my .css files from my pub/ directory after they have landed there. This is my most modern attempt but my files never get ...
Score of 2
0 answers
39 views
Unusual Gulp Task Behaviour
I am struggling with a Gulp Task and what it is doing.
Let me start with the first task:
gulp.task('html-template:join', (cb) => {
gulp.src('./src/template-data/**/*.json')
.pipe(...
Score of 1
2 answers
328 views
Sass @use 'bootstrap/scss/bootstrap' failing with 'Can't find stylesheet to import' in minimal project
I'm encountering a persistent issue where Sass is unable to resolve the import path for Bootstrap, even in a minimal test project. I'm using gulp-sass with Dart Sass.
Here's the problem:
I'm trying to ...
Score of 0
1 answer
236 views
"gulp-sass" and "sass" with ES module is not working , when try to get css from scss files
I’m using Gulp v5.0 to compile, minify, and clean the CSS for my application. I've migrated from CommonJS to ES Modules (ESM) in my Gulp setup.
There’s a custom component (maintained by another team) ...
Score of 1
1 answer
59 views
My SCSS files are not getting saved in css folder with Gulp
I am running my gulp task for compiling my scss files and then convert them to css.
The scss files are getting compiled correctly in the cli. But the css files are not getting saved.
Below is my scss ...
Score of 0
0 answers
33 views
Gulp copying old versions of files
I've just discovered that Gulp is refusing to copy the new version of some font files in one of my projects. I have something like below:
/assets
/classes
/dist
/lib
/sass
mainfile.php
otherfile.php
...
Score of 0
0 answers
72 views
is pdfjs-dist external library is compatible for chrome extension , if yes then what are the step to add into plugin?
I want to extract data from a PDF file in my plugin and use the data for information. I am trying with pdfjs-dist, but it breaks my gulp-building process, showing pdf-dist as an external dependency. ...
Score of 0
1 answer
117 views
How do I fix Error: EPERM: operation not permitted from a gulp task?
[13:04:33] Finished 'deploy_resource_packs' after 10 ms
[13:04:33] 'watch_scripts' errored after 2.21 s
[13:04:33] Error: EPERM: operation not permitted, watch
at FSWatcher._handle.onchange (node:...
Score of 0
0 answers
78 views
How can I "finish" the gulp serve when I didn't write the gulp?
I'm new to working with javascript and I've been requested to add my project to a SharePoint.
After making the changes, I save all the files in VSCode and then use Ctrl+C in the terminal to stop the ...
Score of 0
0 answers
458 views
npm-install error - npm ERR! code 1 - Node Modules Sharp failed
Anyone's help appreciated on this. I've already had four front end developers trying to work this one out. No joy.
I have an environment set up, highly adapted from this one:
https://github.com/...
Score of 1
0 answers
25 views
MS Teams Meeting App - gulp ngrok-serve error
I get the error below when I run gulp bgrok-serve
>>gulp ngrok-serve --debug
[16:34:54] Found additional Yo Teams plugin: yoteams-deploy
[16:34:54] Using gulpfile ~\OneDrive - HEGELMAT\Desktop\...
Score of 0
1 answer
133 views
Gulp 5 not compile if src have multiple items
I have a problem with Gulp because it doesn't compile if there is more than one specific element in the SRC. I need multiple files to be compiled on the JS, PHP and IMG.
Node: 23.1.0
NPM: 10.9.1
Gulp: ...
Score of 0
2 answers
460 views
When I use mix() in dart-sass, the output is rgb() instead of HEX(#)
I use [email protected] , [email protected] on Mac.
The gulp task are as follows.
import { src, dest, series, watch } from 'gulp';
import * as dartSass from 'sass';
import gulpSass from 'gulp-sass';
const ...
Score of 2
1 answer
1380 views
Gulp and "SASS: Deprecation The legacy JS API" Warning?
As many others, I've recently begun to get this error whenever I compile my SASS.
Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
No matter what I do, I ...
Score of 1
1 answer
52 views
gulp-uglify expects an object, non-object provided
I have an old project and have to add a filter to remove an item from the array of objects if the condition is true. I am getting the below error when trying to run gulp build.
[14:44:03] Using ...
Score of -2
1 answer
116 views
odd behavior when using gulp with Deno 2
Now that Deno 2 supports npm, I'm trying to use gulp in Deno 2. But I'm getting odd behavior that's causing me to doubt this will work. I'll provide the list of steps I used later, but first, here's ...
Score of 1
1 answer
51 views
Does Webpack need an entry and output?
I am migrating an old gulp project over to webpack, and wondered if it was possible to make a webpack project that doesn't require the entry and output options, I have a series of tasks that need ...
Score of 1
1 answer
75 views
Why is ccsnano messing up the css of bootstrap styles in gulp builder?
.pipe(sassGlob())
.pipe(sass(["last 2 version", "> 2%"]))
.pipe(autoprefixer())
.pipe(cssbeautify())
.pipe(gulp.dest("./dist/assets/css/"))
.pipe(cssnano())
.pipe(
rename({
suffix: "....
Score of 2
2 answers
5214 views
How to Silence Deprecation Warning in Gulp Sass Task - "The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0."
My current installation is the follow:
Node - v20.18.0 Gulp - v5.0.0 Gulp-Sass - v5.1.0 Sass - v1.80.6
My gulpfile.js:
const gulp = require("gulp");
const sass = require("gulp-sass&...
Score of 0
0 answers
45 views
Trying to download dependencies, but got "Build failed with error code: 1"
I got a great portfolio template from Start Bootstrap, but I ran into an issue installing dependencies. There is no node_modules folder after running npm i. This is my package.json:
{
"title&...
Score of 0
0 answers
28 views
stream.on('exit') in gulp-nodemon
I'm a newbie to gulp. So this question might be obvious.
var gulp = require('gulp');
var shell = require('gulp-shell');
var nodemon = require('gulp-nodemon');
var fs = require('fs');
fs.readdirSync(...
Score of -1
2 answers
119 views
Why is npm library not a function?
There is a problem with npm library for html minify. I downloaded and declared a library
import htmlmin from 'html-minifier';
but when i try to run a gulp task
export const html = () => {
...
Score of 1
0 answers
40 views
Multiple Node.js builds in different subfolders with different node versions with one command possible?
I'm working on a project, a WordPress plugin for the Divi theme, with the following file structure:
root
gulpfile.js
package.json
/src/divi4
gulpfile.js
package.json
/src/divi5
gulpfile.js
package....
Score of 1
1 answer
361 views
BrowserSync throws aggregate Error with Gulp 5/Node.js v.20
I am attempting to rebuild my gulpfile.js after upgrading to Gulp 5 and the most recent stable version of Node.js (20.11.1). The gulpfile below works just fine with Node.js version 16.14.0, but is ...
Score of 0
1 answer
266 views
How to Pass Variables between Nested Includes in Gulp File Include?
I'm using gulp-file-include to build my HTML files and I'm running into an issue with passing variables between nested include files.
File Structure:
.
├── index.html
└── template-parts
└── common
...
Score of 0
1 answer
56 views
Why don't folders delete in gulp tasks? [duplicate]
This task work ok. I use path ".wwwroot/css/site.min.css"
var gulp = require("gulp");
const fs = require('fs').promises;
gulp.task('clean', async function (done) {
try {
...
Score of 1
0 answers
131 views
LitElement with SASS
I am currently using Lit to learn more about custom web components and I am trying to use .scss files to render an style for my components; but I can't find a way to compile the scss files in a way ...
Score of 2
1 answer
284 views
gulp 5 src() make the images format unsupported
I have some images in my project that I want to compress them using gulp
But first I want to move them to the dist folder so I made this simple task
function test(){
return src("src/images/*&...
Score of 1
0 answers
109 views
Uncaught SyntaxError with DOMPurify 3.1.6 and 2.4.9: Invalid Regular Expression due to ${...} in Minified Files
I was using DOMPurify 2.3.10 with Gulp for minifying files, and everything worked fine. However, after upgrading to versions 3.1.6 or 2.4.9, I'm getting the following error:
Uncaught SyntaxError: ...
Score of 0
1 answer
89 views
SVG element not displaying in production mode
I'm facing an issue with viewing the svg elements in production mode, it worked totally fine in development mode (localhost). Me and my team are suspecting it is the issue with the gulp.
<img src=&...
Score of 5
1 answer
1330 views
Bootstrap 5.3.3 _type.scs has waring on compile with Gulp
I am using Bootstrap 5.3.3 in my project and compile using gulp.js
I see warning on every save change.
below message see on terminal.
Deprecation Warning: Sass's behavior for declarations that appear ...
Score of 0
0 answers
289 views
gulp why I get the Error: Input buffer contains unsupported image format?
I am using gulp to simply clone a src folder (jpeg images only).
I used the official documentation -> (https://www.npmjs.com/package/gulp-scale-images)
When I enter gulp in my terminal to run my ...
Score of 1
0 answers
724 views
How to resolve "SSL handshake failed" error when using Penthouse Critical CSS generator (on Node.js)?
I want to create a Gulp task that generates a file with my site's Critical CSS. Penthouse seems to fit exactly what I need.
I can achieve generating the Critical CSS file with http://google.com, and ...
Score of 3
1 answer
840 views
gulp imagemin breaking images and not optimizing
I am trying to setup up the imagemin package to run through gulp. I seem to have got the package running, however there are a number of unexplained issues:
const imgSRC = 'images/*';
const imgDIST = '....
Score of 0
2 answers
162 views
VS Code and Gulp 5.0 / Gulp Cli 3.0
I´m trying to copy some files between folders without success.
This is my program:
const gulp = require('gulp');
const using = require('gulp-using')
const fs = require('fs');
const gzip = require('...
Score of 0
1 answer
26 views
gulp template precompile broken
In the process of trying to update the following I have broken it. I changed require to import but it is obvious that I need to do more - can anyone help? It currently reports
TypeError: template....
Score of 1
1 answer
95 views
Github pipeline for angular js project
I have this github pipeline I just created to automatically deploy an angular js project, that is compiled with the gulp command.
name: Node.js CI with Gulp
on:
push:
branches:
- main
...
Score of 2
0 answers
753 views
Upgrading from gulp 4 to 5: Error: Writable stream closed prematurely
I'm trying to upgrade from Gulp 4 to Gulp 5 and I'm getting Error: Writable stream closed prematurely.
Here's the relevant function:
const download = require('gulp-download2');
/**
* Purgecss can ...
Score of 1
0 answers
42 views
Delete all prior files in dist folder before 'gulp build' task begins?
I'm wanting to deploy a website to a testing server. I have literally spent days watching Youtubes, Lynda.com/LinkedIn Learning, etc. to find the best way to 'gulp build' a dist folder for me to ...
Score of 1
1 answer
838 views
How do I create and use a clean task in Gulp version 5?
I'm trying to create a clean task in my gulpfile that currently looks like this:
const { series, src, dest } = require('gulp');
const del = import('del');
function clean() {
del(['node_modules/...