-
Notifications
You must be signed in to change notification settings - Fork 112
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
Bug since v2.0.0 — RangeError: Maximum call stack size exceeded #42
Comments
Hello, @maxmilton, You can provide |
The number of files in my project root is large, total dirs+files = 27405. Also the tree:
Does fast-glob search the entire project from the __dirname? My specific use case is similar to this:
fastGlob.sync([
path.join(__dirname, '../index.html'),
path.join(__dirname, '../src/**/*.vue'),
path.join(__dirname, '../src/**/*.js'),
]), That's good to hear v2 is faster, obviously I haven't been able to test. |
Thanks for provided details. I'll work on your problem tonight. Now you can exclude Sorry for this situation. |
Using your recommended excludes I'm able to run without any errors. For anyone else's reference, my updated and working code is: fastGlob.sync([
'!**/node_modules',
'!**/dist',
path.join(__dirname, '../index.html'),
path.join(__dirname, '../src/**/*.vue'),
path.join(__dirname, '../src/**/*.js'),
]), This is fine for me so feel free to close this issue. |
After reading the documentation more closely I realised fast-glob starts the search from fastGlob.sync([
'!node_modules',
'!dist',
'index.html',
'src/**/*.vue',
'src/**/*.js',
]), Thank you for your hard work on this project 🥇 |
Well, I need to understand what's going on. If you have free time, then tell me how much free memory you have on the server? I checked work of this the package on directories with more than 500 000 files and it just works. But I have 16GB RAM and a heap of V8 has a size of 1.4 GB. Maybe I can use a more intelligent index for occurrences or try to exclude the directories like So, it's just a working theory. Maybe i'm wrong. |
So, we well work on the solution here: |
Please, try to use |
Sorry I hadn't gotten back to this thread sooner. I can confirm on the current Thank you for your hard work on this project! 🌟 |
Environment
Actual behavior
Since v2.0.0 an error is thrown when run on a filesystem. Number of files/dirs is 54/18 in my case.
Call stack:
Looks to be related to
readdir-enhanced
.Expected behavior
fast-glob
runs without any error thrown.Steps to reproduce
fast-glob
.Code sample
NOTE
Since v2.0.0 has removed bashNative mode, I'm actually going to pin my
fast-glob
version to 1.0.1 anyway since I want that native level of performance. That was actually the reason why I started using fast-glob in the first place!The text was updated successfully, but these errors were encountered: