Runtime Error: error decoding lambda response

Since the latest update of the codebase, I receive the following error when trying to visit the URL(staging in this case)

Site Key: bb865037-1d58-4682-af9f-bc81ea95977d
Branch: Staging

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

In the LOGS the following error appear:

Nov 24, 04:27:05 PM: ERROR  Uncaught Exception 	{"errorType":"Error","errorMessage":"Cannot find package '/var/task/node_modules/ufo/index.js' imported from /var/task/node_modules/vue-bundle-renderer/dist/runtime.mjs","code":"ERR_MODULE_NOT_FOUND","stack":["Error: Cannot find package '/var/task/node_modules/ufo/index.js' imported from /var/task/node_modules/vue-bundle-renderer/dist/runtime.mjs","    at legacyMainResolve (node:internal/modules/esm/resolve:219:26)","    at packageResolve (node:internal/modules/esm/resolve:845:14)","    at moduleResolve (node:internal/modules/esm/resolve:931:18)","    at moduleResolveWithNodePath (node:internal/modules/esm/resolve:1173:14)","    at defaultResolve (node:internal/modules/esm/resolve:1216:79)","    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:542:12)","    at ModuleLoader.resolve (node:internal/modules/esm/loader:510:25)","    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38)","    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40)","    at link (node:internal/modules/esm/module_job:95:36)"]}Nov 24, 04:27:05 PM: ERROR  Uncaught Exception 	{"errorType":"Error","errorMessage":"connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","code":"EMFILE","errno":-24,"syscall":"connect","address":"169.254.100.1","port":9001,"stack":["Error: connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","    at internalConnect (node:net:1094:16)","    at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)","    at node:net:1324:9","    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)"]}Nov 24, 04:27:05 PM: ERROR  Uncaught Exception 	{"errorType":"Error","errorMessage":"connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","code":"EMFILE","errno":-24,"syscall":"connect","address":"169.254.100.1","port":9001,"stack":["Error: connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","    at internalConnect (node:net:1094:16)","    at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)","    at node:net:1324:9","    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)"]}Nov 24, 04:27:05 PM: ERROR  Uncaught Exception 	{"errorType":"Error","errorMessage":"connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","code":"EMFILE","errno":-24,"syscall":"connect","address":"169.254.100.1","port":9001,"stack":["Error: connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","    at internalConnect (node:net:1094:16)","    at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)","    at node:net:1324:9","    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)"]}Nov 24, 04:27:05 PM: ERROR  Uncaught Exception 	{"errorType":"Error","errorMessage":"connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","code":"EMFILE","errno":-24,"syscall":"connect","address":"169.254.100.1","port":9001,"stack":["Error: connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","    at internalConnect (node:net:1094:16)","    at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)","    at node:net:1324:9","    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)"]}Nov 24, 04:27:05 PM: ERROR  Uncaught Exception 	{"errorType":"Error","errorMessage":"connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","code":"EMFILE","errno":-24,"syscall":"connect","address":"169.254.100.1","port":9001,"stack":["Error: connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","    at internalConnect (node:net:1094:16)","    at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)","    at node:net:1324:9","    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)"]}Nov 24, 04:27:05 PM: ERROR  Uncaught Exception 	{"errorType":"Error","errorMessage":"connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","code":"EMFILE","errno":-24,"syscall":"connect","address":"169.254.100.1","port":9001,"stack":["Error: connect EMFILE 169.254.100.1:9001 - Local (undefined:undefined)","    at internalConnect (node:net:1094:16)","    at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)","    at node:net:1324:9","    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)"]}Nov 24, 04:27:06 PM: INIT_REPORT Init Duration: 2141.73 ms	Phase: invoke	Status: error	Error Type: Runtime.Unknown

I already tried installing “ufo” package, but this doesn’t seem to be the issue (same error occurs afterwards).
Build works and runs fine locally and on a node deployment.

Hope you can help me out :wink:

Hi @rxs,

Thanks for reaching out!

Could you let us know which site this is happening on? I’m not finding a site with the Site ID provided.

The error:

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

This error typically happens when a Lambda function fails to return a response in the expected format, or it fails to return any response at all before the function execution completes.

I found some other Netlify Forum post with possible solutions: