Skip to content

Commit f4db146

Browse files
author
NeuroPrep AI
committed
fix: Add deployment troubleshooting guide and automated script
1 parent 91f7c73 commit f4db146

2 files changed

Lines changed: 164 additions & 0 deletions

File tree

DEPLOYMENT_FIX.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# 🚨 URGENT: Deployment Configuration Fix
2+
3+
## Problem
4+
Vercel deployment is failing with: `"The specified Root Directory 'frontend' does not exist"`
5+
6+
## Root Cause
7+
Your Vercel Project Settings have **"Root Directory: frontend"** configured, but the deployment source doesn't match this structure.
8+
9+
---
10+
11+
## ✅ SOLUTION (Choose ONE)
12+
13+
### **Option 1: Fix Vercel Dashboard Settings (RECOMMENDED)**
14+
15+
1. Go to: https://vercel.com/dashboard
16+
2. Click on your project: `frontend` or `neuroprep-ai`
17+
3. Navigate to: **Settings****General**
18+
4. Scroll to: **Root Directory**
19+
5. **Current value:** `frontend`
20+
6. **Change to:** `./` (or leave blank)
21+
7. Click: **Save**
22+
8. Navigate to: **Deployments** tab
23+
9. Find the latest deployment
24+
10. Click: **⋯ (three dots)****Redeploy**
25+
26+
### **Option 2: Use Deployment Script**
27+
28+
Run this from your project root:
29+
```bash
30+
.\deploy.bat
31+
```
32+
33+
The script will:
34+
- ✅ Verify your repository
35+
- ✅ Test build locally
36+
- ✅ Push to GitHub
37+
- ✅ Provide deployment instructions
38+
39+
### **Option 3: Manual Vercel CLI Deploy**
40+
41+
```bash
42+
# Make sure you're in the PROJECT ROOT (not frontend folder)
43+
cd d:\PROJECT\ai-interviewer
44+
45+
# Deploy to production
46+
vercel --prod
47+
```
48+
49+
---
50+
51+
## 🔍 Why This Happens
52+
53+
### Your Repository Structure:
54+
```
55+
d:\PROJECT\ai-interviewer\ ← PROJECT ROOT
56+
├── frontend\ ← Next.js app
57+
│ ├── package.json
58+
│ ├── app\
59+
│ └── ...
60+
├── backend\
61+
├── vercel.json ← Mono repo config
62+
└── ...
63+
```
64+
65+
### What Vercel Sees (Current Config):
66+
```
67+
Vercel Setting: Root Directory = "frontend"
68+
Vercel looks for: frontend/frontend/package.json ❌ (doesn't exist)
69+
```
70+
71+
### What Vercel Should See (After Fix):
72+
```
73+
Vercel Setting: Root Directory = "./" (root)
74+
Vercel looks for: frontend/package.json ✅ (exists!)
75+
```
76+
77+
---
78+
79+
## ✅ Verification After Fix
80+
81+
Once you redeploy, you should see:
82+
83+
**Homepage:**
84+
-**Headline:** "Your Personal AI Tutor"
85+
-**Background:** Void Black (#050505)
86+
-**Accents:** Terminal Green (#4ADE80)
87+
-**Value Props:** 3 pill badges visible
88+
-**NO** "Engineering Excellence. Mastered."
89+
-**NO** blue/purple gradient
90+
91+
**URL:** https://neuroprep-ai.vercel.app
92+
93+
---
94+
95+
## 🆘 If Still Having Issues
96+
97+
1. **Check Git Repository:** Confirm `frontend/` folder exists in GitHub:
98+
https://github.com/SourishSenapati/neuroprep-ai
99+
100+
2. **Verify vercel.json:** Should be at project root with:
101+
```json
102+
{
103+
"builds": [{ "src": "frontend/package.json", "use": "@vercel/next" }]
104+
}
105+
```
106+
107+
3. **Contact Support:** If the above doesn't work, there might be a Vercel project linking issue
108+
109+
---
110+
111+
**Last Updated:** December 21, 2025, 6:15 PM IST
112+
**Status:** ⚠️ Awaiting Vercel Dashboard configuration update

deploy.bat

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@echo off
2+
echo ========================================
3+
echo NeuroPrep AI - Vercel Deployment Script
4+
echo ========================================
5+
echo.
6+
7+
echo [INFO] Checking current directory...
8+
cd /d "%~dp0"
9+
echo Current directory: %CD%
10+
echo.
11+
12+
echo [STEP 1] Verifying repository status...
13+
git status
14+
echo.
15+
16+
echo [STEP 2] Building frontend locally to verify...
17+
cd frontend
18+
call npm run build
19+
if errorlevel 1 (
20+
echo [ERROR] Build failed! Fix errors before deploying.
21+
pause
22+
exit /b 1
23+
)
24+
cd ..
25+
echo [SUCCESS] Build passed!
26+
echo.
27+
28+
echo [STEP 3] Pushing to GitHub...
29+
git add .
30+
git commit -m "deploy: Production deployment - %date% %time%"
31+
git push origin main
32+
echo.
33+
34+
echo ========================================
35+
echo DEPLOYMENT INSTRUCTIONS
36+
echo ========================================
37+
echo.
38+
echo Your code has been pushed to GitHub.
39+
echo.
40+
echo CRITICAL: Update Vercel Settings FIRST:
41+
echo 1. Go to: https://vercel.com/dashboard
42+
echo 2. Select your project
43+
echo 3. Settings ^> General ^> Root Directory
44+
echo 4. Change from "frontend" to "./" (root)
45+
echo 5. Save
46+
echo 6. Deployments tab ^> Click "Redeploy"
47+
echo.
48+
echo OR run this command from PROJECT ROOT:
49+
echo vercel --prod
50+
echo.
51+
echo ========================================
52+
pause

0 commit comments

Comments
 (0)