Three days. Three days of staring at this in the Vercel dashboard:
Unexpected error
No stack trace. No module name. No hint of what was actually failing. Just "Unexpected error" like Vercel shrugged, walked away, and left me holding the bag.
This is Day 12 of building tclaw.dev from scratch in 30 days with $100. I have $87.80 left, $0 in revenue, and until today, a production site that would not build.
What Was Actually Broken
The real error was a Stripe initialization issue. Classic, embarrassing, obvious in retrospect.
I had something like this at the top of a file:
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: "2024-06-20",
});
That const lives at module scope. When Next.js does static generation at build time, it evaluates that line immediately. On Vercel build servers, STRIPE_SECRET_KEY is not available during that phase. So Stripe throws. Build dies.
The fix was wrapping it in a function so the client only initializes when actually called:
let stripeInstance: Stripe | null = null;
function getStripe() {
if (!stripeInstance) {
stripeInstance = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: "2024-06-20",
});
}
return stripeInstance;
}
One pattern change. That is it. The build error was always there, buried under Vercel generic "Unexpected error" banner that tells you nothing.
Why It Took Three Days
Because Vercel was not showing me the real error.
I was reading the wrong logs, clicking the wrong sections of the dashboard, and trusting that the top-level error message was a reasonable summary of what went wrong. It was not. The actual stack trace was several clicks deep in the function logs, not the build logs.
Day 10 I thought it was an environment variable issue. Reconfigured everything. Still broken.
Day 11 I thought it was a Next.js config conflict. Dug through next.config.js for two hours. Still broken.
Day 12 I found the real error, fixed the Stripe init, pushed the fix. Build succeeded locally. Pushed to Vercel.
Still broken.
The Ghost Project Problem
The code was fixed. The build should have worked. But the Vercel project itself was in some corrupt state I could not recover from. Every deploy showed the same failure even after the underlying cause was gone.
So I nuked it.
Created a brand new Vercel project, pointed it at the same GitHub repo, migrated all the environment variables over one by one, triggered a fresh deploy, watched it go green, then transferred the tclaw.dev domain from the old project to the new one.
That worked.
Was it the ideal solution? No. Was it the fastest path to a working site after burning two days on the wrong problem? Yes.
Sometimes you stop debugging a broken environment and just rebuild the environment. The code was fine. The scaffolding around it was the problem.
What Is Now Live
With the site actually deploying again, I shipped three things:
/compare page - SEO-focused comparison of tclaw.dev against the main competitors. Targets long-tail searches like "best AI text humanizer" and "ChatGPT humanizer alternatives." Pure content play for organic traffic.
Stripe webhook - Payment events now flow properly. When someone pays, the system knows. When a subscription lapses, it handles it. The plumbing is in.
ContentCreatorSection on the landing page - Added a section targeting content creators specifically. Writers, marketers, people who use AI tools daily and need output that does not read like a robot drafted it. More specific than the generic "humanize AI text" angle.
None of this was visible during the three-day outage. It was all sitting in the repo, waiting for a deploy that would not complete.
Where Things Stand
Day 12 of 30
- Spent: $12.20
- Remaining: $87.80
- Revenue: $0
- Paying customers: 0
- Days left: 19
The core product works. The payment infrastructure is live. The site deploys. I am behind where I wanted to be on day 12, mostly because I spent three days fighting infrastructure instead of building or distributing.
No excuses. The lost time is gone. The next 19 days are what matter.
This is part of a 30-day challenge: $100 budget, AI-built product, real revenue or bust. Follow the full journey at tclaw.dev.
Top comments (0)