Error: EMFILE: too many open files, open '/var/task/node_modules/lucide-react....
Unanswered
Snowshoe posted this in #help-forum
SnowshoeOP
I just randomly started getting this error yesterday on my Next app deployed on Vercel. It works fine on localhost. I have determined it has something to do with there being too many icons being imported with lucide-react.
[Error: EMFILE: too many open files, open '/var/task/node_modules/lucide-react/dist/esm/icons/search-x.mjs']
I was able to find this github issue but the fix posted didn't actually work for me:
https://github.com/lucide-icons/lucide/issues/1446
modularizeImports: {
'lucide-react': {
transform: 'lucide-react/{{member}}',
skipDefaultConversion: true,
preventFullImport: true,
},
},
I believe I need to do something with modularizeImports (in the docs here) but I cannot seem to get the settings right:
https://nextjs.org/docs/architecture/nextjs-compiler#using-named-imports
I'm starting to lose my mind here trying to figure this out. Any help pointing me in the right direction would be greatly appreciated!
[Error: EMFILE: too many open files, open '/var/task/node_modules/lucide-react/dist/esm/icons/search-x.mjs']
I was able to find this github issue but the fix posted didn't actually work for me:
https://github.com/lucide-icons/lucide/issues/1446
modularizeImports: {
'lucide-react': {
transform: 'lucide-react/{{member}}',
skipDefaultConversion: true,
preventFullImport: true,
},
},
I believe I need to do something with modularizeImports (in the docs here) but I cannot seem to get the settings right:
https://nextjs.org/docs/architecture/nextjs-compiler#using-named-imports
I'm starting to lose my mind here trying to figure this out. Any help pointing me in the right direction would be greatly appreciated!
3 Replies
SnowshoeOP
By the way I am using the most recent version of Next and Lucide-react. I'm also using the pages router if that matters.
SnowshoeOP
e
West African Crocodile
@Snowshoe hey craig! Curious if you found a solution for this?