Fixes
Short, tested fixes for common errors in AI-built apps, for small-business owners and independent builders. Each fix names the exact error and versions, shows the smallest change, and lists what we did not verify. Examples are synthetic.
Fix: "supabaseUrl is required" when your AI-built Next.js app fails to build
Reproduced and fixed on a synthetic app (build only)
Error: supabaseUrl is required. during next build usually means a file creates the Supabase client at the top of the file, and your Supabase variables are not set while the build runs. The smallest fix is to create the client inside a function, so it is only built when a request arrives. Verified on a synthetic app only. You may also need to add the variables in your host's settings (see "Not verified").
Fix: "You're importing a module that depends on `useState`" when your AI-built Next.js app won't build
Reproduced and fixed on a synthetic app (build and server-rendered output only)
This error means a file that uses a React hook such as useState is being treated as a Server Component, which cannot hold state. The smallest fix is to move the interactive part into its own small file that starts with "use client", and import it from your page. Verified on a synthetic app only.
Get The Agent Ledger every Tuesday
Free. One practical AI automation per week, explained in plain language, with a clear monthly cost estimate and what you still do yourself.
Free to subscribe. One email a week, on Tuesdays. Unsubscribe any time. We use your email only to send the newsletter. Privacy