Vercel Website Deployment - Step by Step
Current Status
✅ Project is linked: kcolbchains-projects/website ✅ Repository: abhicris/CR8 ✅ Vercel config updated to use workspace commands
Step-by-Step Configuration
1. Go to Vercel Dashboard
- Visit: https://vercel.com/kcolbchains-projects/website/settings
- Or navigate: Dashboard → website → Settings
2. Configure Root Directory
IMPORTANT: Set Root Directory to the repository root, NOT packages/website
- Go to Settings → General
- Scroll to Root Directory
- Click Edit
- Set Root Directory to:
.(repo root) or leave empty - Click Save
3. Configure Build Settings
- Still in Settings → General
- Scroll to Build & Development Settings
- The
vercel.jsonfile will auto-configure these, but verify:- Framework Preset: Next.js
- Build Command:
npm run build --workspace=packages/website(from vercel.json) - Output Directory:
packages/website/out(from vercel.json) - Install Command: Leave as default
npm install(installs from root) - Node Version: 18.x or 20.x (recommended)
4. Connect to GitHub (if not already connected)
- Go to Settings → Git
- Verify repository:
abhicris/CR8 - If not connected:
- Click Connect Git Repository
- Select
abhicris/CR8 - Choose branch:
main
5. Configure Automatic Deployments
- Go to Settings → Git
- Under Production Branch: Set to
main - Enable Automatic deployments from Git
- Enable Preview deployments for Pull Requests
6. Deploy
After configuring, you can:
Option A: Deploy via Dashboard
- Go to Deployments tab
- Click Redeploy on the latest deployment
- Or push a commit to trigger automatic deployment
Option B: Deploy via CLI
bash
cd packages/website
vercel --prodHow It Works
With Root Directory set to repo root (.):
- ✅ Vercel runs
npm installfrom repo root - ✅ npm workspaces installs all package dependencies
- ✅ Build command runs:
npm run build --workspace=packages/website - ✅ This builds the website package
- ✅ Output is in
packages/website/out - ✅ Vercel deploys from that directory
Expected Result
After configuration, when you push to main:
- ✅ Vercel detects the push
- ✅ Runs
npm installfrom repo root - ✅ Runs
npm run build --workspace=packages/website - ✅ Builds static site in
packages/website/out - ✅ Website is live at:
https://website-kcolbchains-projects.vercel.app
Troubleshooting
Error: "Missing script: 'build'"
Cause: Root Directory was set to packages/website instead of repo root
Solution:
- Go to Settings → General
- Set Root Directory to
.(repo root) or leave empty - Save and redeploy
Error: "routes-manifest.json couldn't be found"
Cause: Output Directory not set correctly
Solution:
- Verify Output Directory is
packages/website/out - Check
vercel.jsonhas correct outputDirectory - Verify
next.config.jshasoutput: 'export'
Error: "Cannot find module"
Cause: Dependencies not installed correctly
Solution:
- Verify Root Directory is repo root (
.) - Check that
package.jsonexists in root with workspaces config - Verify npm workspaces are configured:
"workspaces": ["packages/*"]
Build succeeds but site doesn't work
Cause: Output Directory might be wrong
Solution:
- Verify Output Directory is
packages/website/out - Check
next.config.jshasoutput: 'export' - Verify build creates
packages/website/outdirectory
Verification Checklist
- [ ] Root Directory set to
.(repo root) or empty - [ ] Build Command:
npm run build --workspace=packages/website - [ ] Output Directory:
packages/website/out - [ ] Install Command:
npm install(default, from root) - [ ] Repository connected:
abhicris/CR8 - [ ] Production branch:
main - [ ] Automatic deployments enabled
- [ ] Build completes successfully
- [ ] Website is accessible
Next Steps
After website is deployed:
- Set up custom domain (optional)
- Configure environment variables (if needed)
- Set up the DApp deployment (separate project)