How did you resolve this issue? i am having a similar challenge. I host my app.js file on root directory, the use router to run all my js codes in /routes/index.js
The app is functioning properly on local environment but showing internal server error on Vercel.