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

Release 0.471.0 causes Vercel serverless function to crash with EMFILE: too many open files #2775

Open
8 of 30 tasks
benhonda opened this issue Feb 6, 2025 · 3 comments
Open
8 of 30 tasks
Labels
🐛 bug Something isn't working

Comments

@benhonda
Copy link

benhonda commented Feb 6, 2025

Package

  • lucide
  • lucide-angular
  • lucide-flutter
  • lucide-preact
  • lucide-react
  • lucide-react-native
  • lucide-solid
  • lucide-svelte
  • lucide-vue
  • lucide-vue-next
  • Figma plugin
  • source/main
  • other/not relevant

Version

0.474.0

Can you reproduce this in the latest version?

  • Yes
  • No

Browser

  • Chrome/Chromium
  • Firefox
  • Safari
  • Edge
  • iOS Safari
  • Opera
  • Other/not relevant

Operating system

  • Windows
  • Linux
  • macOS
  • ChromeOS
  • iOS
  • Android
  • Other/not relevant

Description

Related issues:

#2739
#2734
#2730

Don't mean to add unnecessary duplicates to your plate @ericfennis 😅 but ultimately decided to open this issue as the others are marked as closed, and this will hopefully provide some extra context.


It appears the change made in 0.471.0 has broken something in my deployment.

My app uses Remix 2.15.3 and is deployed via Vercel Serverless functions. I am only importing icons as recommended in the docs:

import { Plus } from "lucide-react";

lucide-react 0.470.0 works as expected, and 0.471.0 causes the serverless Vercel function to crash with a handful of errors that look like this:

Error: EMFILE: too many open files, open '/var/task/node_modules/lucide-react/dist/esm/icons/file-lock.js'
    at async open (node:internal/fs/promises:638:25)
    at async readFile (node:internal/fs/promises:1238:14)
    at async getSource (node:internal/modules/esm/load:44:14)
    at async defaultLoad (node:internal/modules/esm/load:116:34)
    at async ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:479:32) {
  errno: -24,
  code: 'EMFILE',
  syscall: 'open',
  path: '/var/task/node_modules/lucide-react/dist/esm/icons/file-lock.js'
}
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.

NOTE: the error above references a specific icon, but the issue isn't with any specific icon. It appears that all of the icons are being bundled/opened?

In the release notes of the problematic 0.471.0, it mentions a potential breaking change that seems like the most likely culprit:

Possible Breaking changes
We have switched to the "exports" property in package.json. This can cause issues if you have directly imported scripts from the package. Please open an issue if we need to refine this export map.


Other relevant specs:

Package manager: Bun 1.1.43

Steps to reproduce

  1. Install lucide-react 0.471.0 or greater.
  2. Import an icon using named exports
import { X } from "lucide-react";
  1. Deploy to Vercel

Checklist

  • I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
@benhonda benhonda added the 🐛 bug Something isn't working label Feb 6, 2025
@sharkaie
Copy link

sharkaie commented Feb 6, 2025

Facing same issue, look lot of time to find out why the application is crashing, and then found this bug. Hope this gets resolved fast.

@seanmcquaid
Copy link

I believe this is related to this : #2743

@sharkaie
Copy link

sharkaie commented Feb 7, 2025

I believe this is related to this : #2743

I hope soon it get's fixed, till then we have to use the downgraded version i guess so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants