Files
copilotkit__copilotkit/showcase/shell-docs/vercel.json
Alem Tuzlak 69e45f5a9d fix(showcase/shell-docs): use npm install on Vercel + sibling-scripts postinstall
Two layered Vercel deploy failures, fixed together:

1. The original `functions` block in vercel.json globbed `app/og/**`
   for a non-api App Router route. Vercel's `functions` only resolves
   under `api/` (or `app/api/...`), so any glob matching `src/app/og/`
   throws "doesn't match any Serverless Functions inside the 'api'
   directory" regardless of the prefix.

   Fix: drop the `functions` block, set `maxDuration` inline via
   Next.js's segment config in
   `src/app/og/[...slug]/route.tsx` (`export const maxDuration = 60`).
   Matches the upstream `docs/` package's intent for the same route.

2. With (1) cleared, the next deploy attempt fell over on the install
   step:

      Scope: all 53 workspace projects
      WARN  Ignoring not compatible lockfile at /vercel/path0/pnpm-lock.yaml
      WARN  GET https://registry.npmjs.org/... ERR_INVALID_THIS

   Vercel auto-detected pnpm at the repo root and tried a workspace-
   wide install. shell-docs is intentionally NOT in
   `pnpm-workspace.yaml` — it's a flat standalone Next.js app that
   ships its own `package-lock.json` (same setup as `shell-dashboard`,
   which is also out-of-workspace and uses npm).

   Fix: add `vercel.json` with `installCommand: "npm install ..."`
   and `buildCommand: "npm run build"` so Vercel uses the local
   package-lock.json instead of walking up into the pnpm workspace.
   Mirrors the `Dockerfile`'s `npm install` path used by Railway.

   shell-docs's build script shells out to sibling
   `tsx ../scripts/generate-registry.ts` etc., so the
   `showcase/scripts/` package's deps need to be installed too. Add a
   `postinstall` hook to `showcase/shell-docs/package.json` that
   does `cd ../scripts && npm install` — same pattern already in
   `showcase/shell-dashboard/package.json` for the same reason.
2026-05-08 15:19:45 +02:00

6 lines
148 B
JSON

{
"$schema": "https://openapi.vercel.sh/vercel.json",
"installCommand": "npm install --no-audit --no-fund",
"buildCommand": "npm run build"
}