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 #208

Open
dct0 opened this issue Jan 8, 2024 · 13 comments
Open

Error: EMFILE: too many open files #208

dct0 opened this issue Jan 8, 2024 · 13 comments
Labels
help wanted Extra attention is needed

Comments

@dct0
Copy link

dct0 commented Jan 8, 2024

Description

Getting the following error when deploying on Vercel importing any icon.

[Error: EMFILE: too many open files, open '/var/task/vercel/path0/node_modules/.pnpm/@[email protected][email protected]/node_modules/@icons-pack/react-simple-icons/icons/SiGooglecloudcomposer.mjs'] {
  errno: -24,
  code: 'EMFILE',
  syscall: 'open',
  path: '/var/task/vercel/path0/node_modules/.pnpm/@[email protected][email protected]/node_modules/@icons-pack/react-simple-icons/icons/SiGooglecloudcomposer.mjs'
}

I have not imported SiGooglecloudcomposer anywhere.
Related issues:

I am using Astro, so I cannot use the Next.js fix. My current workaround is importing the desired icons as follows:

import {
  default as SiPython,
  defaultColor as SiPythonHex
} from "@icons-pack/react-simple-icons/icons/SiPython.mjs";

EDIT here's another workaround:

<svg aria-label="Github logo" viewBox="0 0 24 24" height={12} width={12}>
  <path d={siGithub.path} />
</svg>

Repro

npm create astro@latest
npx astro add react
npm install @icons-pack/react-simple-icons
Add an icon to the home page
Deploy to vercel using '@astrojs/vercel/serverless' https://docs.astro.build/en/guides/deploy/vercel/#adapter-for-ssr

@wootsbot
Copy link
Member

@dct0 can you help me with a live example to reproduce the problem

@dct0
Copy link
Author

dct0 commented Jan 11, 2024

@wootsbot See this repo https://github.com/dct0/react-simple-icons-test for a minimal example and deployment.
Updated repro instructions to be more specific

@irg1008
Copy link

irg1008 commented Apr 5, 2024

Any progress on this? I can't use this when deploying to Vercel

@wootsbot
Copy link
Member

@irg1008 update version

@jessebs
Copy link

jessebs commented May 16, 2024

Updating to 9.5.0 did not resolve the issue for me

itsMapleLeaf added a commit to itsMapleLeaf/aspects-vtt that referenced this issue Jul 15, 2024
@wootsbot
Copy link
Member

Estoy trabajando en esto, las vacaciones fueron largas.

@wootsbot wootsbot reopened this Aug 16, 2024
@wootsbot wootsbot added the help wanted Extra attention is needed label Aug 16, 2024
@santivdt
Copy link

i am using remix, same problem..

@wootsbot
Copy link
Member

i am using remix, same problem..

I hope to solve it this week, please help me with a link so I can reproduce it

@babaiyu
Copy link

babaiyu commented Nov 19, 2024

i am using remix, same problem..

Me too, i'm also using Remix & deploy to Vercel. Currently i change package from react-simple-icons to react-icons and it works when i deploy again to Vercel. Not sure why it's happening.

@shirshendubhowmick
Copy link

Is there any update on this ? Is there even anyone looking into this issue ?

@wootsbot
Copy link
Member

Is there any update on this ? Is there even anyone looking into this issue ?

I will prioritize this next week. I’ve been very busy, but I hope to get back to it soon.

@shirshendubhowmick
Copy link

@wootsbot let me know if I could help someway. I built a project using these icons and found this issue while deplopying to Vercel 😅 , has become a big blocker me.

@stevebrowndotco
Copy link

I don't think treeshaking is working correctly when this library is built and packaged for npm. Then, for us consumers, I think what is happening is that the edge function on vercel is loading every single file in this library causing this burnout . The error will not occur if the page is not SSG. Other libraries like lucide-react have had this problem in the past as well.

However, I can confirm directly importing the file solves the problem:

import SiApple from '@icons-pack/react-simple-icons/icons/SiApple';
import SiFacebook from '@icons-pack/react-simple-icons/icons/SiFacebook';
import SiGoogle from '@icons-pack/react-simple-icons/icons/SiGoogle';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants