[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# build problem payloadcms next

28 views · 1 like · 2 posts


Constantbourgois (@constantbourgois) · 2025-12-20

<!-- Questions that get answered the fastest are the ones with relevant info included in the original post. Be sure to include all detailDescription:
```
Build failing during "Collecting build traces" phase with error: [TypeError: Expected a non-empty string]
Stack:
Next.js 15.5.9
Payload CMS 3.68.5
PostgreSQL (Supabase)
Cloudflare R2 via @payloadcms/storage-s3
Issue: Build works locally with pnpm run build but fails only on Vercel during build trace collection.
All environment variables are set: DATABASE_URL, PAYLOAD_SECRET, R2_BUCKET, R2_ENDPOINT, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY
Attempted fixes (all failed):
URL-encoded DATABASE_URL
Disabled GraphQL
Conditional S3 plugin loading
Standalone output mode
Verbose logging
Need internal build trace analysis to identify where empty string is being passed in AWS SDK S3 client. needed to let others see and understand the problem! -->

<!-- Current versus Expected behavior -->

<!-- Code, configuration, and steps that reproduce this issue -->

<!-- Project information (URL, framework, environment, project settings) -->


BestCodes (@bestcodes) · 2025-12-23 · ♥ 1

@constantbourgois Could you share the issue you're experiencing? :slight_smile: