Deploying to Netlify and error decoding lambda response errors

Hello,

I don't know where to start. I Recently moved from Vercel to Netlify, and I cannot get it to work with my Tanstack Start project. Everytime I navigate to my app https://flowthings.netlify.app/, I get the following error:

error decoding lambda response: error decoding lambda response: unexpected end of JSON input


Looking in the Netlify function logs, I get the following for the server handler:

Jan 27, 10:03:34 AM: ERROR  Uncaught Exception     {"errorType":"Error","errorMessage":"EMFILE: too many open files, open '/var/task/.netlify/functions-internal/server/node_modules/date-fns/max.js'","code":"EMFILE","errno":-24,"syscall":"open","path":"/var/task/.netlify/functions-internal/server/node_modules/date-fns/max.js","stack":["Error: EMFILE: too many open files, open '/var/task/.netlify/functions-internal/server/node_modules/date-fns/max.js'"]}
Jan 27, 10:03:35 AM: INIT_REPORT Init Duration: 3146.63 ms    Phase: invoke    Status: error    Error Type: Runtime.Unknown
Jan 27, 10:03:35 AM: Unknown application error occurred
Runtime.Unknown
Jan 27, 10:03:35 AM: 3b2fe2ac Duration: 3288.76 ms    Memory Usage: 120 MB


It is not always about date-fns, but the error is the same Error: EMFILE: too many open files. How can I troubleshoot this?
Was this page helpful?