Repository navigation
Fix the Vercel demo build by importing packages/web as the project root - #5
Merged
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Importing the repo on Vercel failed with
Missing script: "build:demo". Vercel ran the rootvercel.json'snpm run build:demofrom insidepackages/web, where that script doesn't exist. Vercel's auto-detection also found two apps (theDockerfileandpackages/web) and steered the import toward its multi-service mode, which this static demo doesn't need.Changes
packages/web/vercel.json. It runs the demo build from the repo root, servesdist/and rewrites/api/graphto the pre-builtgraph.json.vercel.json, so there is exactly one Vercel config and the two can't conflict.build:demoscript topackages/webthat delegates to the root script, sonpm run build:demoworks from either directory.docs/DEPLOY.mdnow says to set Root Directory topackages/weband not to use the multi-service import.Testing
npm ci, then the commands frompackages/web/vercel.json:dist/holds the UI plusgraph.json(4,671 nodes, 7,324 edges).npm ci --ignore-scriptsalso passes, so Vercel's esbuild install-script warning is harmless.npm run build:demoworks frompackages/web, the exact command that failed.After merging
In Vercel, keep Root Directory at
packages/web, clear any build or install command typed into the project settings, and click Redeploy.