Skip to content

Commit 7b6eb3d

Browse files
Merge pull request #23 from RQM-Technologies-dev/cursor/vercel-venv-deploy-fix-a39f
Fix Vercel deployment by using a project virtualenv
2 parents 0dc4d68 + ed1ca93 commit 7b6eb3d

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ Build output is written to `site/`.
4141

4242
---
4343

44-
## Vercel deployment posture
44+
## Vercel deployment
4545

46-
This repository is configured for static publishing on Vercel.
46+
This repository is a static MkDocs site and is deployed on Vercel using a project-local virtual environment.
4747

48-
- **Framework preset:** `Other` (explicitly disable framework auto-detection)
49-
- **Install command:** `pip install -r requirements.txt`
50-
- **Build command:** `mkdocs build --strict`
51-
- **Output directory:** `site`
48+
Vercel's Python runtime may be externally managed (for example by `uv`), so direct system-level `pip install` can fail. Creating and using `.venv` keeps dependency installation isolated from the managed system Python and avoids `externally-managed-environment` errors.
5249

53-
The repository `vercel.json` pins this behavior with `"framework": null`, which maps to Vercel's **Other** framework preset and prevents Python backend entrypoint checks.
50+
- **Framework preset:** `Other` (`"framework": null` in `vercel.json`)
51+
- **Install command:** `python -m venv .venv && . .venv/bin/activate && python -m pip install --upgrade pip && pip install -r requirements.txt`
52+
- **Build command:** `. .venv/bin/activate && mkdocs build --strict`
53+
- **Output directory:** `site/`
5454

55-
If the project was previously configured as Python in the Vercel dashboard, update it to **Framework Preset = Other** and trigger a redeploy.
55+
The `site/` directory is the published static output from MkDocs.
5656

5757
---
5858

vercel.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
33
"framework": null,
4-
"installCommand": "pip install -r requirements.txt",
5-
"buildCommand": "mkdocs build --strict",
4+
"installCommand": "python -m venv .venv && . .venv/bin/activate && python -m pip install --upgrade pip && pip install -r requirements.txt",
5+
"buildCommand": ". .venv/bin/activate && mkdocs build --strict",
66
"outputDirectory": "site"
77
}

0 commit comments

Comments
 (0)