Files
supermemory/apps/docs/scripts/dev.sh
Soham Daga 1c235f146a chore(docs): run Mintlify development with Node 22
## Stack context

This is the final PR in the V5 documentation stack and changes only the local development command.

## What and why

Run Mintlify through an isolated Node 22 runtime so `bun dev` works on machines whose active Node version is newer than Mintlify supports. The wrapper preserves Portless and the existing fixed docs port.

```mermaid
flowchart LR
  Command[bun dev] --> Portless[Portless proxy]
  Portless --> Wrapper[scripts/dev.sh]
  Wrapper --> Runtime[Node 22 plus Mintlify]
```

## Validation

- `bash -n apps/docs/scripts/dev.sh`: passed.
- Mintlify validation under the Node 22 wrapper: passed.
- No dependency or lockfile changes are included.

## Impact

Local development only. Production documentation output is unchanged.
2026-09-19 21:49:52 -07:00

18 lines
578 B
Bash

#!/usr/bin/env bash
set -euo pipefail
docs_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
docs_port="${PORT:-3003}"
mintlify_args=(dev --no-open --port "$docs_port")
printf -v docs_dir_escaped "%q" "$docs_dir"
printf -v mintlify_args_escaped " %q" "${mintlify_args[@]}"
# Run outside the monorepo so npx does not pick up Mintlify's Bun-installed
# dependency tree, which is incompatible with its Node-based schema compiler.
cd /tmp
exec npx --yes \
--package node@22 \
--package mintlify@latest \
--call "cd $docs_dir_escaped && mintlify$mintlify_args_escaped"