Skip to content

Fix the Vercel demo build by importing packages/web as the project root - #5

Merged
harsharajkumar-273 merged 2 commits into
mainfrom
claude/practical-thompson-7w19xy
Oct 22, 2026
Merged

harsharajkumar-273 merged 2 commits into
mainfrom
claude/practical-thompson-7w19xy

Conversation

@harsharajkumar-273

@harsharajkumar-273 harsharajkumar-273 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Problem

Importing the repo on Vercel failed with Missing script: "build:demo". Vercel ran the root vercel.json's npm run build:demo from inside packages/web, where that script doesn't exist. Vercel's auto-detection also found two apps (the Dockerfile and packages/web) and steered the import toward its multi-service mode, which this static demo doesn't need.

Changes

  • Adds packages/web/vercel.json. It runs the demo build from the repo root, serves dist/ and rewrites /api/graph to the pre-built graph.json.
  • Removes the root vercel.json, so there is exactly one Vercel config and the two can't conflict.
  • Adds a build:demo script to packages/web that delegates to the root script, so npm run build:demo works from either directory.
  • docs/DEPLOY.md now says to set Root Directory to packages/web and not to use the multi-service import.

Testing

  • Fresh clone, clean npm ci, then the commands from packages/web/vercel.json: dist/ holds the UI plus graph.json (4,671 nodes, 7,324 edges).
  • The same build with npm ci --ignore-scripts also passes, so Vercel's esbuild install-script warning is harmless.
  • npm run build:demo works from packages/web, the exact command that failed.
  • I couldn't run Vercel itself, so the real deploy is the final check.

After merging

In Vercel, keep Root Directory at packages/web, clear any build or install command typed into the project settings, and click Redeploy.

Vercel detects the root Dockerfile and packages/web as two apps and
steers the import toward its multi-service mode, which this static demo
doesn't need. With Root Directory set to packages/web the project is a
single Vite app; its vercel.json runs the demo build from the repo root
and rewrites /api/graph to the pre-built graph. The build was run from
that directory to confirm dist/ holds the UI and graph.json.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
Vercel ran the root vercel.json's `npm run build:demo` with the working
directory at packages/web, where that script didn't exist. Remove the
root vercel.json so packages/web/vercel.json is the only Vercel config,
and add a build:demo script to packages/web that delegates to the root
one, so the command works from either directory.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
codegraph Ready Ready Preview Oct 22, 2026 4:28am UTC

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d7eb929f-4f89-4b85-b3b3-7949fdbceea1
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@harsharajkumar-273
harsharajkumar-273 merged commit eaaa32f into main Oct 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants