Deploying to vercel returns Error: Debug Failure

I have the following project which is working without problem on my local computer. I uploaded it one month ago a post but haven’t found a way to implement it and can’t reply over it.

Current versus Expected behavior

Current Behavior:
- Project deploys successfully locally with `npm run dev`
- API endpoints work locally
- Frontend communicates with backend successfully in development
- Vercel deployment fails with "Debug Failure" error
- Environment variables are properly set in Vercel dashboard

Expected Behavior:
- Successful deployment to Vercel
- API endpoints accessible through Vercel URL
- Frontend able to communicate with deployed API
- Warden Protocol integration working in production

Code, configuration, and steps that reproduce this issue

1. Project Structure:
- React + Vite frontend
- Express.js API
- Warden Protocol integration
- The Graph API integration
- Anthropic Claude API integration

2. Key Configuration Files:
vercel.json:
```json
{
  "version": 2,
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "builds": [
    {
      "src": "api/index.ts",
      "use": "@vercel/node",
      "config": {
        "maxDuration": 10,
        "memory": 1024,
        "includeFiles": ["src/tools/**"]
      }
    },
    {
      "src": "package.json",
      "use": "@vercel/static-build",
      "config": {
        "distDir": "dist"
      }
    }
  ],
  "rewrites": [
    { "source": "/api/(.*)", "destination": "/api/index.ts" },
    { "source": "/(.*)", "destination": "/index.html" }
  ]
}
3. Steps to Reproduce:
1. Clone repository
2. Install dependencies: `npm install`
3. Set up environment variables
4. Run locally: `npm run dev` (works)
5. Push to GitHub
6. Deploy to Vercel (fails)

Project information

Framework & Environment:
- Frontend: React 18.2.0 + Vite 4.5.0
- Backend: Express.js 4.18.2
- Node.js: 18.x
- TypeScript: 5.0.0
- Deployment Platform: Vercel
- Source Control: GitHub

Key Dependencies:
- @wardenprotocol/warden-agent-kit-core: 0.0.24
- @wardenprotocol/warden-langchain: 0.0.7
- @langchain/anthropic: 0.3.12
- graphql-request: 7.1.2

Project URLs:
- Development: http://localhost:5173
- API (local): http://localhost:3001
- Production: https://adifi-4il7y1q3v-juls95s-projects.vercel.app
- GitHub Repository: [[Your repo URL]](https://github.com/Juls95/adifi)

Environment Variables Required:
- ANTHROPIC_API_KEY
- GRAPH_API_KEY
- NODE_ENV

I hope this helps to understand my setup and the issues I’m facing.

Thanks

If you’re having trouble deploying an Express app, this guide can help.

You can also ask v0 for suggestions tailored to your own project setup.