This presumably applies to monorepos with just package to be published.
Are there are documents describing the best practice for deploying say serverless functions and a React app, or do I just create a separate project for each?
For future reference, the root directory needs to be the directory of the sub-package within the monorepo, and the build/install directories need to be specified relative to that.
It is obvious now, of course …
Project type: other
Root directory: the root of the individual package being deployed - package/x
It’s been a long 24-hours, and eventually I discovered that the problem was I had been advised elsewhere to use an .npmrc file with the contents worksapces=true.
That was a bad idea, and broke everything.
By the time I had discovered that, I had already switch to using Turbo, which was a straight forward process, just adding a turbo.json file with a minimal configuration.
Having done that, I turned off all the ‘zero configuration’ options in dashboard, set ‘Framework’ to ‘other,’ and let the root directory blank. That allowed me to use a vercel.json without warnings and confusion:
"installCommand": "npm install",
"buildCommand": "npx turbo run build",
"outputDirectory": "packages/client/build",
This works.
Note to self: the log output running vercel build is actually running the package.json script vercel-build…!
Creating a Vercel Postgres instance has proven to be straight forward: now some fun with hooking up serverless functions! See you in my next confused post…!