Questions tagged [gulp-watch]
A gulp plugin that listens for file changes and emits changed files into the stream. Not to be confused with the built-in gulp.watch().
839
questions
0
votes
0
answers
27
views
GULP | Gulp imagemin takes too much time to convert images
Here is my gulpfile.js code:
"use strict"
const { src, dest } = require("gulp")
const gulp = require("gulp")
const autoprefixer = require("gulp-autoprefixer")
...
0
votes
0
answers
324
views
TypeError: this.pingIntervalTimer.refresh is not a function
I use the gulp for my project. When I run the task 'gulp watch', the server launches as it should, but after 500-600ms I get an error in the console "TypeError: this.pingIntervalTimer.refresh is ...
0
votes
0
answers
27
views
Precompile/compile nunjucks refresh issue gulp-inline-source
Hi there this is a long shot but, hope someone can help,
I am using gulp-inline-source-html (https://github.com/exuanbo/gulp-inline-source-html) & gulp-nunjucks-render (https://github.com/...
0
votes
1
answer
869
views
require() of ES Module gulpfile.js not supported n gulp node js
gulpfile.js
'use strict';
const gulp = require("gulp");
const imagemin = require("gulp-imagemin");
const webp = require("imagemin-webp");
const extReplace = require("...
0
votes
1
answer
14
views
Gulp reccuring functions not ending?
I have a problem with returns in a special function that I'm using to generate styles.
I have 3 stylesheets to generate, that have different file names/variables. So I created a function instead of ...
0
votes
1
answer
56
views
Migrated from Gulp3.9.1 to Gulp 4, NodeMon server/process restarts in loop
I migrated gulp from 3.9.1 to Gulp 4.0.2. Converted all the task as per Gulp 4 guidelines, however when I run 'gulp' from command line, all the tasks until 'nodemon'
starts and finishes, but when it ...
0
votes
1
answer
127
views
gulp-sass slower with each compile
I have a very simple *.scss compilation task with the use of npm and gulp 4.
It is watched by
const scssWatcher = watch(['scss/*.scss']);
scssWatcher.on('all', function(event, path){ compileSass(path);...
0
votes
0
answers
17
views
How to optimize GULP?
A simple gulpfile was written that collects statics in a separate folder and the functionality for viewing changes is configured.
But there is a problem when changing the script starts to collect all ...
1
vote
1
answer
50
views
Gulp to watch a css and minify on change
I have the following gulp file which will watch my styles.scss file and update my style.css file. Each time the styles.css file updates i then need to run 'gulp minifycss' to minify it. Im wondering ...
0
votes
1
answer
38
views
Globbing with gulp not working as expected
This gulp.watch copies the file ../server confs/oc.fr/http.conf to the directory server_etc_httpd_conf/ when changed/saved:
gulp
.watch(['../server confs/oc.fr/httpd.conf'])
.on('change', ...
0
votes
0
answers
96
views
gulp & browser-sync cache JS and CSS files (how to disable cache ?)
I am using gulp and browser-sync for the local development. The problem is that browser-sync (or gulp) caches the js and css resources even after i changed them. After pressing hard refreshes many ...
1
vote
0
answers
96
views
Error in deployment of gulp based website
I am trying to deploy a gulp based website but i get this error every time i do gulp deploy i encounter this problem can anyone help?
$ gulp deploy
[00:19:01] Using gulpfile E:\newfolder\gulpfile.js
[...
0
votes
0
answers
292
views
Gulp RequestError: connect ECONNREFUSED 127.0.0.1:80
I have a gulpfile that worked on my computer before I had to reinstall Windows. I wrote it a few years ago and to be honest, Gulp isn't something I use outside of this, so my understanding and memory ...
1
vote
0
answers
26
views
How to redirecting to custom error page when subpage is not found in Gulp
I working on creating a custom error page for a website which uses gulp but i don't know know to redirect automatically to it in case of wrong url or a page is not found or any other error
Can anyone ...
0
votes
0
answers
83
views
How to debug Node.js app in VS Code with Auto Attach feature?
I start my web-app in development mode with this watch.sh-file, with the terminal:
export PORT=8080;
export NODE_ENV=development;
clear
gulp watch
Breakpoints are set, Auto Attach feature is enabled, ...
0
votes
0
answers
48
views
How to run multiple returns in gulp function?
I'm using the gulp-file-include package to make development locally a little bit easier.
I currently have three HTML pages:
index.html
contact.html
products.html
The way my setup works is:
Make ....
0
votes
0
answers
32
views
gulp.js: Watch all folders
Ich habe gulp.js so konfiguriert, dass die Ordnerstruktur im src Order auch im dist Ordner erhalten bleibt. Alle Dateien werden also in den selben Ordner (im dist-Ordner) ausgegeben.
.
+-- src
| +-- ...
0
votes
0
answers
22
views
Struggling to get gulp v4 to watch tasks with babel plugin
When I try to gulp watch, I get the following error:
[15:46:56] Task never defined: watch
[15:46:56] To list available tasks, try running: gulp --tasks
Here are my functions from gulpfile.js.
...
0
votes
0
answers
64
views
Gulp not found file gulpfile.js, not running preprocessor
I have some problem with gulp... I've clone repo from github, then run npm install. In this repo I have package.json and gulpfile.js I need this gulp for compile scss to css. Gulp should start working ...
0
votes
1
answer
202
views
gulp not compiling scss in subfolders
I have the following folder structure:
theme
assets
build
css
style.css
src
theme
buttons.scss
style.scss
components
hero
hero.html
...
0
votes
0
answers
29
views
Gulp or gulp watch doesn't watch file changes
I am trying to watch scss & js files.
so far I've tried this answer: gulp watch doesn't watch
How can I make sure all files are watched automatically when I run gulp or gulp watch
My gulpfile ...
0
votes
0
answers
130
views
I can't get gulp-sass to compile SCSS to update the css after I make changes . It only says as "watch"
So for some reason when I run npm run watch it looks like its working, then I do changes on my SCSS but nothing updates on /assets/css. The paths are right, so i am sure there is no mistake there.
...
0
votes
0
answers
97
views
Gulp-minify how to remove duplicate files
Im trying to minify JS files with Gulp, but what is happening is that it copies all the original files im trying to minify to the destination folder /minify whereas I want there to be only the ...
0
votes
0
answers
20
views
Does gulp initialize browserSync only once, even if being initiated in a task that executes multiple times?
I have the following code in my gulp file:
...
function styles () {
browserSync.init({
proxy: "https://localhost", //use your own server uri
port: 8000 //use your own port
});...
1
vote
1
answer
100
views
Gulp Watch starts but doesn't compile
When compiling my gulp file using "gulp watch", the gulp proces starts but doesn't compile. It isn't outputting any errors, so I'm not sure why it's starting but not compiling any of the ...
0
votes
1
answer
87
views
tslint configuration issue in gulp project
I run, gulp bundle and I'm getting this error so any body know why it might be?
gulp --version
CLI version: 2.3.0
Local version: 4.0.2
node --version
v12.18.3
1
vote
0
answers
114
views
Gulp watch only run once with one file
There are a lot of questions on this topic. I have been through them and not found an answer, though located the specific issue.
The following watch will only execute et-js the first time that is ...
1
vote
1
answer
140
views
Gulpfile not compiling Scss & JS properly
I am trying to create a gulpfile.js to compile scss to css and JS components to a main JS file. But it's not working properly.
The issues i am facing, when I run the command gulp:
It doesn't compile ...
0
votes
1
answer
305
views
Is there a way to have Browsersynch on gulp watch my WP php files?
So I downloaded this Worpress template with gulp and browsersynch which watches all .js files and .css files. The wierd thing is that whenever I want to use gulp and BroswerSynch I have to type npm ...
0
votes
1
answer
210
views
Gulp: Migrating Gulpfile.js from gulp 3 to 4
Here i am trying to migrate my existing site which is using gulp 3. Now upgrading gulp from 3 to 4.
Below is Gulpfile.js
'use strict';
var gulp = require('gulp'),
autoprefixer = require('gulp-...
0
votes
1
answer
1k
views
Error: File not found with singular glob: (if this was purposeful, use `allowEmpty` option)
I am trying to automate a task with watch, in gulp. I am a beginner at this.
This is code:
const { series, src, dest, watch } = require('gulp');
const sass = require('gulp-sass');
// Función que ...
0
votes
1
answer
509
views
Failure to run the Gulp task runner and error while running Gulp Command
I inside the folder where the project is located through the command:
npm i gulp gulp-sass sass --save-dev
I have installed Gulp, but when I want to run it with this command in vs.code terminal :
...
3
votes
2
answers
6k
views
'node_modules' is not recognized as an internal or external command, operable program or batch file
I am using gulp in my application.
installed gulp
put the npm script
run the script by using "npm start"
Got the error:-
**> start
node_modules/.bin/gulp watch
'node_modules' is not ...
0
votes
1
answer
322
views
Gulp js stuck on "Starting 'watch'"
Saving the file does not save the changes made on localhost only until I build again.
I'm on a fork where the other people using the same upstream do not encounter this issue. I reinstalled gulp, npm, ...
1
vote
2
answers
417
views
BrowserSync keeps reloading infinitely when using Docker
When starting the application (on http://localhost:3001) and editing some files Browsersync keeps reloading and never stops. This however doesn't happen when not using Docker.
Is there a reason for ...
1
vote
1
answer
1k
views
Gulp Watch does not work on Windows Subsystem for Linux 2 (WSL 2)
I am working on a project on WSL 2 in windows. The project uses node to only compile sass and minify js. I have saved the project files on my Windows File System. I access the project files and run ...
1
vote
0
answers
52
views
Gulp is stuck on "start watch"
The "watch" function does not work. After I run "gulp watching" command, make changes in my "style.scss" file, save it and wait for changes, but nothing happens. All I ...
2
votes
1
answer
1k
views
Gulp watch not detecting file changes
my Gulp task is starting correctly but not deteccting file changes. I'm developing a WordPress theme from starter-bootstrap.
Run 'npm install' and all dependecies where installed. Now when I run 'npm ...
0
votes
1
answer
77
views
Gulp Webpack not watching file in docker
I have a project node using docker. my project is built using gulp. when in local (not docker), watching for file change is working, but not in docker. how to solve this?
As additional information, I ...
1
vote
1
answer
11k
views
Getting error ReferenceError: primordials is not defined
While I am trying to do gulp build or gulp watch I am getting below error -
ReferenceError: primordials is not defined
at fs.js:47:5
at req_ (/Users/testuser/projects/insights/node_modules/...
1
vote
1
answer
83
views
gulp creating un wanted directory
instead of replacing the theme.scss.liquid file with the compiled scss a _styles folder is created with the updated theme.scss.liquid
gulpfile.js
const requireDir = require('require-dir');
// ...
0
votes
1
answer
232
views
Gulp is not compiling sass to css
I am not able to get the sass code I write to compile into CSS when I use any of the following commands:
gulp watch
gulp scss-for-prod
gulp scripts-for-prod
The strange thing is though that fork picks ...
1
vote
1
answer
119
views
Gulp watch don't include hidden folders (with dot)
I have structure:
-/app/.default/style.sass
-/app/another_folder/style.sass
-glpfile.js
and gulp task
gulp.task('watch', function() {
gulp.watch('./app/**/*.sass', gulp.parallel('sass'));
...
0
votes
1
answer
2k
views
SCSS Undefined variable error when using Gulp
I am using gulp-sass to compile SCSS, but received the following error message:
[19:51:38] 'sassTask' errored after 98 ms
[19:51:38] Error in plugin 'gulp-sass'
Message:
assets\scss\base\...
0
votes
0
answers
195
views
exclude a file from gulp compilation
I have a gulp file that looks like this,
const paths = {
styles: {
src: 'src/styles/**/*.scss',
dest: 'dist/styles',
},
javascript: {
src: 'src/scripts/**/*.js',
dest: 'dist/...
1
vote
0
answers
314
views
Gulp is not running. It is giving "SyntaxError: Unexpected token import" error
I am getting this error after run GULP
(function (exports, require, module, __filename, __dirname) { import gulp from 'gulp';
^^^^^^
...
0
votes
1
answer
164
views
Gulp watch not watching .js files
Just went back to a very old project and updated to Gulp 4.0.2.
Managed to get it watching and compiling css, but doesn't seem to watch changes to the JavaScript files?
It doesn't throw any errors, ...
0
votes
0
answers
121
views
Configuring and running gulp to watch and compile sass
I have configured my gulp file to run certain tasks, and when I run the file I get this error:
AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask]
Here is my code ...
0
votes
0
answers
591
views
Gulp serve takes too long to build
After creating the project using yo teams and upon running the gulp serve command the command takes 1-2 mins to build on every save. I don’t know what is the main reason but I have disabled multiple ...
1
vote
0
answers
179
views
Gulp.js watch is not working in VS 2019 when saving
Can someone tell me what I'm doing wrong in my gulp.js file to allow for the user to hit save and it update my .css file from the .sass file change?
If I manually hit Run under my Task it will work
...