var c=Object.defineProperty;var n=(a)=>a;function r(a,i){this[a]=n.bind(null,i)}var m=(a,i)=>{for(var l in i)c(a,l,{get:i[l],enumerable:!0,configurable:!0,set:r.bind(i,l)})};var p=(a,i)=>()=>(a&&(i=a(a=0)),i);import{CodeBlock as d}from"@contractspec/lib.design-system";import o from"@contractspec/lib.ui-link";import{ChevronRight as s}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function v(){return t("div",{className:"space-y-8",children:[t("div",{className:"space-y-2",children:[e("h1",{className:"font-bold text-4xl",children:"Troubleshooting"}),e("p",{className:"text-lg text-muted-foreground",children:"Common issues and fixes when installing or generating with ContractSpec."})]}),t("div",{className:"space-y-6",children:[t("div",{className:"card-subtle space-y-3 p-6",children:[e("h2",{className:"font-bold text-2xl",children:"Command not found"}),t("ul",{className:"space-y-2 text-muted-foreground",children:[e("li",{children:"Reinstall the CLI and ensure it is in your PATH."}),e("li",{children:"Confirm Node.js 20+ or Bun 1.0+ is installed."})]})]}),t("div",{className:"card-subtle space-y-3 p-6",children:[e("h2",{className:"font-bold text-2xl",children:"Specs not discovered"}),t("ul",{className:"space-y-2 text-muted-foreground",children:[t("li",{children:["Run ",e("code",{children:"contractspec list"})," to see discovered specs."]}),e("li",{children:"Verify your spec path conventions in .contractsrc.json."})]})]}),t("div",{className:"card-subtle space-y-3 p-6",children:[e("h2",{className:"font-bold text-2xl",children:"Build or validate fails"}),t("ul",{className:"space-y-2 text-muted-foreground",children:[t("li",{children:["Run ",e("code",{children:"contractspec validate"})," to surface schema errors."]}),e("li",{children:"Check that generated files were not manually edited."})]})]}),t("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Diagnostics"}),e(d,{language:"bash",filename:"troubleshooting-diagnostics",code:`contractspec --version
contractspec list
contractspec validate src/contracts/mySpec.ts`})]}),t("div",{className:"card-subtle space-y-3 p-6",children:[e("h2",{className:"font-bold text-2xl",children:"Still blocked?"}),t("ul",{className:"space-y-2 text-muted-foreground",children:[e("li",{children:"Confirm compatibility requirements for runtime and framework."}),e("li",{children:"Re-run builds on a clean branch to isolate changes."}),e("li",{children:"Use a new spec and minimal adapter to validate setup."})]})]})]}),t("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[e(o,{href:"/docs/getting-started/start-here",className:"btn-ghost",children:"Start here"}),e(o,{href:"/docs/getting-started/compatibility",className:"btn-ghost",children:"Compatibility"}),t(o,{href:"/docs/getting-started/installation",className:"btn-primary",children:["Next: Installation ",e(s,{size:16})]})]})]})}export{v as TroubleshootingPage};
