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

Error: EMFILE: too many open files on W10 #398

Open
canugurlu opened this issue Jan 13, 2022 · 0 comments
Open

Error: EMFILE: too many open files on W10 #398

canugurlu opened this issue Jan 13, 2022 · 0 comments

Comments

@canugurlu
Copy link

I have 50k+ image files.

I am getting this error: Error: EMFILE: too many open files

My code:

`const imagemin = require('imagemin');
const imageminJpegtran = require('imagemin-jpegtran');
const imageminPngquant = require('imagemin-pngquant');

const files = imagemin(['temp/*.{jpg,png,jpeg}'], {
destination: 'buyuk',
plugins: [
imageminJpegtran(),
imageminPngquant({
quality: [0.6, 0.8]
})
]
});

console.log(files);`

Here is my terminal output:

`PS C:\laragon\www\test\node2> node .\index.js
Promise { }
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^

[Error: EMFILE: too many open files, open 'C:\Users\Mert\AppData\Local\Temp\98468220-26c9-4bbb-a0c9-7b8ba5bcd4fc'] {
errno: -4066,
code: 'EMFILE',
syscall: 'open',
path: 'C:\Users\Mert\AppData\Local\Temp\98468220-26c9-4bbb-a0c9-7b8ba5bcd4fc'
}`

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

1 participant