Here’s the solution if anyone stumble upon this scenario (monorepo with local TS packages):
You need to build them all first before building your website.
netlify.toml
example:
[build]
command = "npx lerna build" # build not only frontend, but all TS packages with a build script.
functions = ""
publish = "packages/frontend/public"
Besides that, leave it all in a default lerna + yarn workspaces configuration. It handles all the local and external packages gracefully.