From 3c3312de350d98451b910676ff7da9d12620dba0 Mon Sep 17 00:00:00 2001 From: Samarth MN Date: Sun, 1 Nov 2026 15:52:50 +0530 Subject: [PATCH] Run the pinned pnpm through npx in Vercel builds Vercel's bundled pnpm reads packageManager (pnpm@12.11.2), tries to switch itself to it, and fails with "the installed pnpm wrapper is missing". site/vercel.json now runs pnpm 12.11.2 through npx for both install and build, so Vercel's own pnpm is never used. Co-Authored-By: Claude Opus 5.5 --- docs/releasing.md | 2 +- site/vercel.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/releasing.md b/docs/releasing.md index fb2a246..4a9710e 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -21,7 +21,7 @@ The site is a static Astro build deployed by Vercel's Git integration. Its setti 1. In Vercel, choose **Add New → Project** and import `samarthmn/echo-voice-web`. 2. Set the **Root Directory** to `site`, and keep **Include files outside the root directory in the Build Step** enabled: the site reads `docs/`, `brand/`, `public/fonts/` and `scripts/` from the repository root. -3. Leave the framework, install and build settings to `site/vercel.json` (Astro; `pnpm install --frozen-lockfile --filter echo-site`; `pnpm build`; output `dist`). +3. Leave the framework, install and build settings to `site/vercel.json` (Astro; output `dist`). It runs the repository's pinned pnpm (12.11.2) through `npx` for install and build, because Vercel's bundled pnpm cannot switch itself to pnpm 12. Keep that version in step with `packageManager` in `package.json`. 4. Under **Settings → General**, choose Node.js 22 or newer. 5. Under **Settings → Domains**, add `echo-web.samarthmn.com` and create the DNS record Vercel shows. 6. Under **Analytics**, enable Web Analytics. Builds on Vercel then include its cookieless script, served from the site's own `/_vercel/insights` path. Analytics only ever run on the website, never in the app. diff --git a/site/vercel.json b/site/vercel.json index df5b48a..8022d83 100644 --- a/site/vercel.json +++ b/site/vercel.json @@ -1,8 +1,8 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", "framework": "astro", - "installCommand": "pnpm install --frozen-lockfile --filter echo-site", - "buildCommand": "pnpm build", + "installCommand": "npx --yes pnpm@12.11.2 install --frozen-lockfile --filter echo-site", + "buildCommand": "npx --yes pnpm@12.11.2 run build", "outputDirectory": "dist", "trailingSlash": true, "headers": [