Before you open this issue, please complete the following tasks:
What were you expecting to happen?
src glob on nonexistent directory to successfully no-op.
What actually happened?
An ENOENT error was thrown.
Please give us a sample of your gulpfile
const { src, dest } = require('gulp');
function defaultTask(cb) {
return src('input/*.js')
.pipe(dest('output/'));
}
exports.default = defaultTask
Terminal output / screenshots
Error: ENOENT: no such file or directory, scandir '/project/input'
Please provide the following information:
- OS & version [e.g. MacOS Catalina 10.15.4]: RHEL 8
- node version (run
node -v): 24.0.1
- npm version (run
npm -v): 11.3.0
- gulp version (run
gulp -v): 5.0.1
Additional information
On attempting to upgrade from gulp v5.0.0 to v5.0.1, an error is thrown that was not thrown before.
In v5.0.0, if the parent directory of the glob didn't exist, nothing was copied and the gulp build proceeded without error.
In v5.0.1, an ENOENT error is now thrown, breaking the build.
Before you open this issue, please complete the following tasks:
What were you expecting to happen?
srcglob on nonexistent directory to successfully no-op.What actually happened?
An
ENOENTerror was thrown.Please give us a sample of your gulpfile
Terminal output / screenshots
Error: ENOENT: no such file or directory, scandir '/project/input'Please provide the following information:
node -v): 24.0.1npm -v): 11.3.0gulp -v): 5.0.1Additional information
On attempting to upgrade from gulp v5.0.0 to v5.0.1, an error is thrown that was not thrown before.
In v5.0.0, if the parent directory of the glob didn't exist, nothing was copied and the gulp build proceeded without error.
In v5.0.1, an ENOENT error is now thrown, breaking the build.