fix: build the web project from apps/web, not the repo root - #9
Merged
Conversation
Deploy web failed with:
Error: The pattern "index.py" defined in `functions` doesn't match any
Serverless Functions.
That is the API's vercel.json. The web project was linked from inside apps/web,
which leaves its rootDirectory null, so vercel resolves config and source
relative to the working directory -- and CI ran every step from the repo root,
where the only vercel.json describes a FastAPI function.
Both web jobs now set working-directory: apps/web. Verified locally before
pushing rather than after: `vercel build --prod` from that directory produces a
Next.js build, and the output's config.json carries the rewrite the whole
same-origin design depends on:
{"src": "^/api(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))?$",
"dest": "https://workflowguard-api.vercel.app/api/$1"}
docs/vercel.md claimed the web project's Root Directory was apps/web. It is not
-- linking from that directory sets nothing -- so the table now says so and
explains why the jobs need the working directory instead.
Deploy API is green as of the previous run; this is the last job that has never
succeeded.
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.
Deploy API (production)is green now.Deploy web (production)is the last job that has never succeeded, and it fails with:Cause
That's the API's
vercel.json. The web project was linked from insideapps/web, which leaves itsrootDirectorynull, so Vercel resolves config and source relative to the working directory. CI ran every step from the repo root, where the onlyvercel.jsondescribes a FastAPI function.Fix
Both web jobs now set
working-directory: apps/web.Verified locally before pushing this time, rather than after — we'd spent five CI round-trips discovering these one at a time.
vercel build --prodfromapps/webproduces a real Next.js build, and the output'sconfig.jsoncarries the rewrite the whole same-origin design rests on:{"src": "^/api(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))?$", "dest": "https://workflowguard-api.vercel.app/api/$1", "check": true}Docs correction
docs/vercel.mdclaimed the web project's Root Directory wasapps/web. It isn't — linking from that directory sets nothing. The table now says so and explains why the jobs needworking-directoryinstead.Pipeline progress
vercel pullvercel pullvercel build(api).vercelignorewithheld tracked filesvercel build(web)Everything except
deploy-webis now green, including a successful API deploy from CI.