As the title states, I’m getting an ENOENT error on a binary file that is definitely there. The file is titled main, and it’s permissions are correct. I have tried the following with no luck:
path.join(process.cwd(), ‘/api/main’);
path.join(“.”+process.cwd(), ‘/api/main’);
‘var/task/api/main’
‘./api/main’
‘./main/’
I’ve also tried all the above inside and outside of the api directory and changed the root of the deployment accordingly.
This didnt seem to work, Here’s the error I’m getting:
shim] error: Error: spawn var/task/api/main ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: ‘ENOENT’,
syscall: ‘spawn var/task/api/main’,
path: ‘var/task/api/main’,
spawnargs:
}
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
INIT_REPORT Init Duration: 108.39 ms Phase: init Status: error Error Type: Runtime.ExitError