Troubleshooting
Find the symptom below and fix the root cause. Never silence a build or network guard by turning it off.
Find the symptom below and fix the root cause. Never silence a build or network guard by turning it off.
proto resolves to moonrepo
If proto prints moonrepo toolchain-manager help, another binary named proto appears earlier on your PATH. Run command -v proto to confirm, and invoke your project binary explicitly with bun run proto --version, bunx proto --version, or ./node_modules/.bin/proto --version.
proto check problems
markup: a component prototype contains lowercase HTML elements. Move markup into the production view component or expose a prop.invalid_meta:metamust be a static object literal withtitleandstates, and drafts must live at<drafts>/<slug>/index.proto.tsx.invalid_slug/reserved_slug/duplicate_slug: prototype slugs are kebab-case derived from the file name (stay-checkout.proto.tsx→stay-checkout), cannot start withflow-, and must be unique across prototypes and drafts.unknown_spec/unknown_role: register the id underspecsorrolesinproto.config.ts, or fix the typo.network_import: inspect the reportedchainand cut the first import reaching a forbidden module. Often a view imports a query hook or API client, or the prototype imports a barrelindex.tsthat re-exports data modules. Note thatnetwork_importonly runs after registry problems are resolved.unknown_prototype/unknown_state/unknown_node/unreachable/dead_end: checkproto list --jsonfor valid slugs and states, add missing edges, or mark terminal nodes withend: true.specs_unavailable/canvas_missing/uncovered_state: these are non-failing warnings.specs_unavailableoccurs when aspecsfunction returnsnull(for example when an ignored folder is absent in CI); leave it rather than returning{}.
Render origin and Vite plugins
proto dev, proto check, proto build, proto screenshot, and proto evidence compile prototypes using your app's vite.config.* in proto-render mode.
- App-only plugins interfere during prototype rendering (route generators, devtools, error-upload plugins, proxies): gate them in
defineConfig(({ mode }) => ...)and skip them whenmode === "proto-render". - Prototypes render unstyled: import your app stylesheet inside
proto.canvas.tsx. CSS loads on the render origin only through the canvas. - One theme looks wrong: the render host toggles
.darkandcolor-schemeonhtml. If your design system uses a different convention, apply thethemeprop insideCanvas. host_not_allowed: open the gallery at127.0.0.1or add the extra hostname (without a port) todev.allowedHosts.
Local serving and daemon logs
Start by running proto status --json (it starts nothing) and inspecting ~/.config/protohq/daemon/daemon.log.
port_in_use: Proto's port or preview ports are occupied. Stop Proto withproto stopand start on another port withPROTOHQ_PORT=4500 proto start.daemon_unavailable: Proto did not start or answer; runproto stopthenproto startand inspectdaemon.log.daemon_version_mismatch: upgrade@protohq/cliin the project to match the running Proto server.state_unavailable: Proto cannot read or lock~/.config/protohq/daemon; fix permissions or the held state lock before retrying.project_busy: another capture or startup holds the project; wait or keepproto devrunning to share a warm server.project_offline: the project is stopped or has not started once to reserve its preview address; runproto devin that project folder.
proto start --json and proto stop --json are idempotent. After a deliberate proto stop, project terminals wait until proto start; an unexpected exit triggers automatic recovery.
Hosted operations and store commands
- Multiple apps: pass
--app <dir>when a workspace has more than oneproto.config.ts(app_required). - Wrong account or workspace: run
proto whoamiandproto workspace list, then switch withproto workspace use <slug>. - Remote comment commands: always pass both
--remoteand--share <slug>. Reload a stale snapshot before reviewing. key_busy: another writer holds the local review lock; retry. Useproto review unlock <key> --forceonly for manual recovery when a person requests it.
Storybook, Vitest, and optional peers
production_boundaryduringstorybook build: Storybook loadedvite.config.tswhich includesproto(). Extract shared React/Tailwind/alias settings intovite.shared.ts, point Storybook'sviteConfigPathat it, and addprotoPresentation()inviteFinal.playwright_missing(exit3): installplaywrightand runbunx playwright install chromium. Re-run browser installation after upgrading Playwright.- Legacy
0.1.xskills: runproto init --skillsto install the currentprotoandproto-apply-commentsskills, then remove anyauthor-prototypeorapply-prototype-commentsfolders reported underlegacySkills.
See the error registry for every code and exit status, and the troubleshooting skill reference for agent-specific recovery steps.