iconoir: BUG: Too many open files on Next 13
Prerequisites
- Version: 6.2.0
- Are you running from source/main: No
- Are you using a released build: Yes
- Operating system: Deployed on Vercel
Step to reproduce
- Upgrade to 6.2.0
- Use tons of Icon everywhere
- Deploy to Vercel
Actual behavior
- Build passed on Vercel, but server-side rendering/rehydration throws the error below
NOTE: Dev/Build is working just fine on the local machine
Any message or error
2023-02-05T23:21:36.825Z
ERROR [Error: EMFILE: too many open files, open '/var/task/node_modules/.pnpm/iconoir-react@6.2.0_react@18.2.0/node_modules/iconoir-react/dist/esm/ShareIos.mjs'] {
errno: -24,
code: 'EMFILE',
syscall: 'open',
path: '/var/task/node_modules/.pnpm/iconoir-react@6.2.0_react@18.2.0/node_modules/iconoir-react/dist/esm/ShareIos.mjs',
page: '/'
}
RequestId: d7fb0c90-4232-4896-8c8a-0e1598ad436e Error: Runtime exited without providing a reason
Runtime.ExitError
Additional info or screenshots
Downgrading to 6.1.0 fixed the issue. This is likely introduced by https://github.com/iconoir-icons/iconoir/pull/240
Upvote & Fund
- We’re using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 25 (9 by maintainers)
Downgrading to v6.1.1 Worked for me
npm i iconoir-react@6.1.1 --force
ornpm i iconoir-react@6.1.1
as mention above by @louisgv
Ah, yes, Typescript. I think the approach then should revolve around automatically generating a
types.d.ts
at the root of the package, in a way that both Typescript and NextJS are happy with explicit imports. I just haven’t gotten around to it yet.And thus we have the current state of NodeJS module resolution 😅 - I appreciate the research on this! When I have a bit of time I’ll play around with it but I can’t imagine I’ll find anything better than you have already.