Skip to content

Fix Vercel deployment configuration conflict#16

Merged
robdimarco-atxp merged 1 commit intomainfrom
robdimarco/fix-vercel-functions-builds-conflict
Sep 10, 2025
Merged

Fix Vercel deployment configuration conflict#16
robdimarco-atxp merged 1 commit intomainfrom
robdimarco/fix-vercel-functions-builds-conflict

Conversation

@robdimarco-atxp
Copy link
Contributor

@robdimarco-atxp robdimarco-atxp commented Sep 10, 2025

Summary

Fixes Vercel deployment error: "The functions property cannot be used in conjunction with the builds property"

Problem

Vercel deployment was failing because our vercel.json configuration was using both:

  • Legacy builds property (Vercel v1/v2 style)
  • Modern functions property (current Vercel standard)

These two configuration approaches are incompatible in modern Vercel deployments.

Solution

  • Removed legacy builds array - No longer needed as Vercel auto-detects TypeScript/Node.js files
  • Kept modern functions property - Essential for setting maxDuration: 30 on serverless function
  • Preserved routes and installCommand - Required for single-service architecture

Configuration Changes

Before:

{
  "builds": [{"src": "backend/server.ts", "use": "@vercel/node", ...}],
  "functions": {"backend/server.ts": {"maxDuration": 30}}
}

After:

{
  "routes": [{"src": "/(.*)", "dest": "/backend/server.ts"}],
  "functions": {"backend/server.ts": {"maxDuration": 30}}
}

How it Works Now

  1. Auto-detection: Vercel automatically detects backend/server.ts as Node.js serverless function
  2. Single route: All requests route to Express server (both API and static frontend)
  3. Build process: npm run setup handles dependency installation and building
  4. Function timeout: 30-second limit configured for serverless function

Test Plan

  • Vercel configuration validated (no syntax conflicts)
  • Single-service architecture preserved (Express serves both API and React frontend)
  • Build process remains unchanged (npm run setup)

This should resolve the Vercel deployment error and allow successful deployment of the single-service ATXP Express application.

Linear Issue: https://linear.app/novellum/issue/ATXP-258/add-one-click-deploy-for-atxp-expresso-example

🤖 Generated with Claude Code

**Problem**: Vercel deployment failed with error:
"The functions property cannot be used in conjunction with the builds property"

**Solution**:
- Remove legacy builds property from vercel.json
- Keep modern functions property for maxDuration configuration
- Maintain routes and installCommand for single-service architecture

Vercel now auto-detects the backend/server.ts file and builds it appropriately
without needing explicit builds configuration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@robdimarco-atxp robdimarco-atxp merged commit 940ed65 into main Sep 10, 2025
1 check passed
@robdimarco-atxp robdimarco-atxp deleted the robdimarco/fix-vercel-functions-builds-conflict branch September 10, 2025 14:25
robdimarco-atxp added a commit that referenced this pull request Sep 10, 2025
**Problem**: Vercel deployment failed with error:
"The functions property cannot be used in conjunction with the builds property"

**Solution**:
- Remove legacy builds property from vercel.json
- Keep modern functions property for maxDuration configuration
- Maintain routes and installCommand for single-service architecture

Vercel now auto-detects the backend/server.ts file and builds it appropriately
without needing explicit builds configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant