dev build Emfile error

Hello there, I am working on an extension project using plasmo, since few days I am getting an EMFILE error: « too many open files » on the npm run dev command. I feel that I reach a point where the hot reload can not watch all the files anymore because I don’t have the problem on the npm run build command. I think that the watcher is also looking at the nodes modules cause my extension I not that big. My question, if you agree with my hypothesis is : how to not make plasmo( the hot reload )watch over node modules files?
14 Replies
lab
lab•2y ago
@irdane can you try clearing the cache (via rmdir .plasmo) if that doesn't work, can you paste your verbose log Also which version of plasmo are you using?
irdane
irdaneOP•2y ago
Thanks Louis for your answer. Unfortunately I already try to delete the cache and it does not work. I tried again to be sure, same result.
irdane
irdaneOP•2y ago
Here some screenshots of the error logged and the package.json
No description
No description
Arcane
Arcane•2y ago
@irdane has reached level 1. GG!
lab
lab•2y ago
Can you run it with npm dev -- --verbose The watcher ignore all node_modules. It seems that the raw scheme is being used extensively (?)
irdane
irdaneOP•2y ago
Thanks for the precisions about the watcher. Here the logs of npm run dev — —verbose
No description
lab
lab•2y ago
Do you use the raw: scheme anywhere in your popup?
irdane
irdaneOP•2y ago
Can you précise what is raw: ? I don’t feel I am using any but maybe I don’t get what it is exactly.
lab
lab•2y ago
It's one of the import scheme we support: https://docs.plasmo.com/framework/import
Plasmo Docs
Import Resolution – Plasmo
How imports work with the Plasmo Framework.
lab
lab•2y ago
But that's weird... likely similar to the nextjs issue of trying to resolve a CJS package :d...
lab
lab•2y ago
The error above is similar to this one: https://github.com/iconoir-icons/iconoir/issues/243
GitHub
BUG: Too many open files on Next 13 · Issue #243 · iconoir-icons/ic...
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 everyw...
lab
lab•2y ago
Which is likely due to barrel file import see: https://discord.com/channels/946290204443025438/1126843970367008819
liam47.
liam47.•9mo ago
was this issue solved? I have it with this error:
🔴 ERROR | EMFILE: too many open files, open 'C:\\Users\\mcawe\\IdeaProjects\\Work\\ctrl-extension\\node\_modules\\@plasmohq\\parcel-packager\\package.json'
🟡 24 | Error: EMFILE: too many open files, open 'C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@plasmohq\parcel-packager\package.json'
at Object.readFileUtf8 (node:internal/fs/sync:25:18)
at Object.readFileSync (node:fs:441:19)
at $10145ab9dc478fed$export$c4e0ef2ab73c21e7.readFileSync (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\fs\lib\index.js:1038:108)
at getPkg (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\package-manager\lib\index.js:3684:57)
at get pkg [as pkg] (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\package-manager\lib\index.js:3694:32)
at loadPlugin (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\loadParcelPlugin.js:114:7)
at async ParcelConfig.loadPlugin (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\ParcelConfig.js:92:18)
at async PackagerRunner.loadConfig (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\PackagerRunner.js:151:18)
at async PackagerRunner.loadConfigs (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\PackagerRunner.js:140:5)
at async PackagerRunner.run (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\PackagerRunner.js:126:9)
at async Child.handleRequest (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\workers\lib\child.js:193:9)
🔴 ERROR | EMFILE: too many open files, open 'C:\\Users\\mcawe\\IdeaProjects\\Work\\ctrl-extension\\node\_modules\\@plasmohq\\parcel-packager\\package.json'
🟡 24 | Error: EMFILE: too many open files, open 'C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@plasmohq\parcel-packager\package.json'
at Object.readFileUtf8 (node:internal/fs/sync:25:18)
at Object.readFileSync (node:fs:441:19)
at $10145ab9dc478fed$export$c4e0ef2ab73c21e7.readFileSync (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\fs\lib\index.js:1038:108)
at getPkg (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\package-manager\lib\index.js:3684:57)
at get pkg [as pkg] (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\package-manager\lib\index.js:3694:32)
at loadPlugin (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\loadParcelPlugin.js:114:7)
at async ParcelConfig.loadPlugin (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\ParcelConfig.js:92:18)
at async PackagerRunner.loadConfig (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\PackagerRunner.js:151:18)
at async PackagerRunner.loadConfigs (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\PackagerRunner.js:140:5)
at async PackagerRunner.run (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\core\lib\PackagerRunner.js:126:9)
at async Child.handleRequest (C:\Users\mcawe\IdeaProjects\Work\ctrl-extension\node_modules\@parcel\workers\lib\child.js:193:9)
Arcane
Arcane•9mo ago
@liam47. has reached level 1. GG!
Want results from more Discord servers?
Add your server