Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp v5.0.0 does not work if the root folder contains too many files (Works in Gulp v4.0.2) #2785

Closed
zivkovic opened this issue Apr 7, 2024 · 1 comment

Comments

@zivkovic
Copy link

zivkovic commented Apr 7, 2024

What were you expecting to happen?

The script to work with Gulp v5.0.0

What actually happened?

Gulp v5.0.0 starts up, then throws error RangeError: Maximum call stack size exceeded.

Please give us a sample of your gulpfile

const { src, dest, parallel, series, watch } = require("gulp");
function streamTask() {
  return src(["pdf/**"]);
}
exports.default = streamTask;

Terminal output / screenshots

Gulp v5.0.0:
image

Gulp v4.0.2:
image

Please provide the following information:

  • OS & version [e.g. MacOS Catalina 10.15.4]: Linux Manjaro 23.1.4
  • node version (run node -v): v21.7.2
  • npm version (run npm -v): 10.5.0

Additional information

I created a sample project with the above gulpfile and the following package.json:

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "dev": "gulp"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "gulp": "^5.0.0"
  }
}

In the root folder I have the following structure:

test/pdf/*  // Contains 50 pdf files
test/media/* // Contains approx 84000 random files (images, pdf, videos, etc...)
test/package.json
test/gulpfile.js

Command used to get file count in root folder: find . -type f | wc -l, result: 84039

If I simply change the gulp version from "gulp": "^5.0.0" to "gulp": "^4.0.2" the project works as intended.

@phated
Copy link
Member

phated commented Apr 7, 2024

This is a duplicate of gulpjs/glob-stream#125, please follow that issue for updates.

@phated phated closed this as completed Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants