stacksdapp doctor. Use stacksdapp doctor --strict in CI to fail on warnings.
Contents
- Prerequisites
- Project not found
- Deploy failures
- Devnet issues
- Clarity version mismatch
- Bindings out of sync
- Check failed
- Frontend errors
- Tests and generate failed
- Init conflicts
- Git hook blocked commit
- Getting help
Prerequisites
Project not found (exit 2)
cdto a directory containingstacksdapp.tomlorcontracts/Clarinet.toml- Or:
stacksdapp --root /path/to/project <command> - For raw Clarinet repos: run
stacksdapp initfirst
Deploy failures (exit 8)
Testnet / mainnet
Devnet
Devnet issues
Boot stuck
- Ensure Docker is running
- Stop conflicting containers:
docker ps --filter name=devnet -q | xargs docker stop stacksdapp clean --force- Retry
stacksdapp dev --auto-deploy - Do not run manual
clarinet devnet startalongsidestacksdapp dev
Stall after ~block 71
Known issue with long-running local devnet (PoX / signer timeout). Workarounds:- Deploy early:
stacksdapp dev --auto-deploy - Use testnet for deploy verification
- Full reset:
stacksdapp clean --force, restart Docker, retry
Clarity version / epoch mismatch
- C5 requires
epoch = "3.4"(not"4.0") - C6 requires
epoch = "4.0" - Regenerate plans:
cd contracts && clarinet deployments generate --devnet
stacksdapp add name --clarity-version 5
Full mapping: Clarity versions
Bindings out of sync
frontend/src/generated/* manually. See Code generation.
Check failed (exit 6)
Runstacksdapp check and fix Clarinet checker errors in .clar files.
use of undeclared trait <sip-010-trait>
Explorer or deploy abort when impl-trait uses a short trait name instead of a full on-chain contract path.
Fix steps:
- Run
stacksdapp add NAME --template sip010(orsip009) instead of rewriting from blog snippets - Match
[[project.requirements]]inClarinet.tomlto the target network stacksdapp check→stacksdapp test→ redeploy
Frontend errors
Cannot convert [object Object] to a BigInt
Common when formatting SIP-010 balances or other uint read-only results.
Cause: Hook data from read-only calls uses cvToValue, which represents (ok uint) as { type: "uint", value: "1500000" } — not a native bigint.
Fix: Do not BigInt(hook.data) directly. Unwrap the cvToJSON shape first. Full helpers and examples: Frontend guide.
Failed to fetch on read-only calls
Browser could not reach the Stacks node — not a contract revert.
Checklist:
cat frontend/src/generated/deployments.json— contract entry existsgrep NEXT_PUBLIC_NETWORK frontend/.env.local— matches deploy network- After testnet deploy:
stacksdapp dev --network testnet(not default devnet) - Guard read-only
call()until wallet address is valid; showhook.error
Tests failed (exit 7) / Generate failed (exit 10)
Tests:- Validate
contracts/Clarinet.toml - Run
npm installincontracts/andfrontend/ stacksdapp clean --forcethenstacksdapp generate
Init conflicts
Merge duplicatesettings/, tests/, or deployments/ directories before rerunning stacksdapp init.
Git hook blocked commit
The pre-commit hook blocks likely seed phrases inTestnet.toml and Mainnet.toml. Unstage real mnemonics before committing.
Emergency bypass only: