Edited: solved, see post
Hi, TL;DR - This issue only happens when project root directory (and its corresponding vercel.json) is located in a subfolder. Vercel fails to properly find api/index.js and deploy it into functions. I've tried to search through community and wondering why few people has mentioned this issue? Where am I doing wrong?
Here is the minimal example for you to reproduce the issue: (Project Information is provided below) https://github.com/hmpthz/express-vercel/tree/main
From the attached screenshot you can clearly see, one deployment has functions while the other doesn't. I've also downloaded the api/index.js of each deployment and found that their contents were identical. So the build process shouldn't have anything wrong.

Succesful Deployment URL: https://express-vercel-2tp8rntjg-hmpthzs-projects.vercel.appFailed Deployment URL: https://express-vercel-8sam9n51l-hmpthzs-projects.vercel.appEnvironment (local, preview, production): Doesn't matterProject Framework:Build Settings: Framework Preset: Other Build Command (if not default): pnpm run -F server build && node postinstall.cjs Output Directory (if not default): dist Install Command (if not default): pnpm -F server installNode/Runtime Version:Package Manager: pnpm (I'm using its workspace feature, but I don't think this is the problemRelevant Packages: