Error: EMFILE: too many open files, open '/opt/buildhome/repo/node_modules/lodash-es/lt.js'

2    (node:2287) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
14:49:54.472    (Use `node --trace-deprecation ...` to show where the warning was created)
14:49:55.274    
14:49:55.275    node:internal/event_target:1090
14:49:55.275      process.nextTick(() => { throw err; });
14:49:55.275                               ^
14:49:55.280    Error: EMFILE: too many open files, open '/opt/buildhome/repo/node_modules/lodash-es/lt.js'
14:49:55.280        at async open (node:internal/fs/promises:638:25)
14:49:55.280        at async readFile (node:internal/fs/promises:1238:14)
14:49:55.280        at async getSource (node:internal/modules/esm/load:44:14)
14:49:55.280        at async defaultLoad (node:internal/modules/esm/load:116:34)
14:49:55.280        at async ModuleLoader.load (node:internal/modules/esm/loader:570:7)
14:49:55.281        at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:443:45) {
14:49:55.281      errno: -24,
14:49:55.281      code: 'EMFILE',
14:49:55.281      syscall: 'open',
14:49:55.281      path: '/opt/buildhome/repo/node_modules/lodash-es/lt.js'
14:49:55.281    }
14:49:55.281    
14:49:55.281    Node.js v22.9.0
14:49:55.432    error: script "build" exited with code 1


I am getting this error. Local builds and deploys work as expected but cloudflare deploys throw this error. This is deploying Sveltekit on Workers.
Was this page helpful?