Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore studio vercel build #73

Open
dtbuchholz opened this issue Feb 21, 2025 · 5 comments
Open

Explore studio vercel build #73

dtbuchholz opened this issue Feb 21, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@dtbuchholz
Copy link
Collaborator

dtbuchholz commented Feb 21, 2025

For some reason, the commit 206f896 by via the release.yml flow's bot (see vercel) caused the build output below. However, an earlier commit c358e5c with the same bot via the release.yml flow didnt have this behavior (see vercel), and things built fine. That is, both of these were release commits: chore(release): version packages (by github-actions[bot]).

It appears to be an issue with vercel and has happened before, irrespective of the release commits.

After forcing a rebuild/deploy on vercel, everything went back to normal. It's not clear why this happened because the build logs for the problematic case above didn't show anything odd.

Image

and issues with _next/static:
Image

@dtbuchholz dtbuchholz changed the title Explore release commit & studio vercel build Explore studio vercel build Feb 21, 2025
@dtbuchholz
Copy link
Collaborator Author

some potential issues / fixes—according to cursor, it's likely a race condition or caching issue during the build/deploy process:

  1. race condition during build/deploy
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
  // Add output: 'standalone' to ensure more reliable builds
  output: 'standalone',
  
  // Optionally increase the build timeout
  experimental: {
    buildTimeout: 120, // seconds
  }
}

module.exports = nextConfig
  1. caching issues
// vercel.json
{
  "headers": [
    {
      "source": "/_next/static/(.*)",
      "headers": [
        {
          "key": "Cache-Control",
          "value": "public, max-age=31536000, immutable"
        }
      ]
    }
  ]
}
  1. build output config & ensure clean builds
{
  "scripts": {
    "build": "rm -rf .next && next build",
    "vercel-build": "rm -rf .next && next build"
  }
}
  1. env var race condition in build
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
  env: {
    // Add any build-time env vars here
    NEXT_PUBLIC_CHAIN_NAME: process.env.NEXT_PUBLIC_CHAIN_NAME,
  }
}

module.exports = nextConfig

@dtbuchholz dtbuchholz added the bug Something isn't working label Feb 21, 2025
@dtbuchholz
Copy link
Collaborator Author

another example from today: https://vercel.com/recallnet/portal/EAb1kJyX9tpmeE6PmpsvWqxqtzwo

@dtbuchholz
Copy link
Collaborator Author

@asutula it looks like this vercel build issue happened on additional merges we made today. idk what the root cause is but (lazily) wrote up at a few ideas above that we can try.

@asutula
Copy link
Contributor

asutula commented Feb 24, 2025

It's happened on every merge to main for quite a while now. I've been meaning to investigate what could be going on. Thanks for starting that work. Like you said, a redeploy fixes it. I'll take a closer look at your potential solutions and do some thinking.

@dtbuchholz
Copy link
Collaborator Author

ahh kk gotcha, yeah it's so weird

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants