Nothing burns more time than debugging code that uses an API which doesn't exist. The AI isn't trying to fool you, it just fills gaps in your prompt with plausible-sounding guesses. The fix takes 20 seconds: paste a "rules block" at the top of every build prompt listing exactly what it's allowed to use, like this:
"Stack: Next.js 15 (App Router), Tailwind CSS v4, Supabase for auth and DB, lucide-react for icons. Only use these, never invent libraries or APIs, and never use deprecated patterns."
With constraints in place, the AI stops hallucinating imports like react-super-table-x and instead writes code that runs on your actual stack. Works for debugging too: paste your package.json versions alongside the error and it won't suggest fixes meant for another major version. 🚀