Troubleshooting
When something fails, start with the exact command output and identify which stage failed: dependency installation, Prisma generation/migration, Dashild scaffolding, or the Next.js dev server. These stages are separate; rerun only the step that needs attention rather than deleting generated files or the database.
Useful checks:
pnpm prisma generatepnpm dashild doctorpnpm devprisma generate refreshes the generated client and Dashild metadata after a
schema change. dashild doctor checks resource and policy wiring without
connecting to the database. pnpm dev starts the app so you can reproduce a
runtime or browser problem.
The panel does not hydrate on 127.0.0.1
Section titled “The panel does not hydrate on 127.0.0.1”Next 16 only allows localhost for dev assets and HMR by default. Open
http://localhost:3000, not http://127.0.0.1:3000, or add the origin to
next.config.ts:
const nextConfig: NextConfig = { allowedDevOrigins: ["127.0.0.1", "localhost"],};The generated config already includes both.
dashild init cannot find the metadata
Section titled “dashild init cannot find the metadata”init reads dashild-metadata.json, which the dashild Prisma generator
writes. Run pnpm prisma generate before init. If the file lives outside the
standard paths, pass it explicitly:
pnpm dashild init --auth better-auth --metadata prisma/generated/dashild/dashild-metadata.jsonThe theme switch does not appear
Section titled “The theme switch does not appear”The switch needs both theme.toggle: true and a themeAction prop. The route
generated by dashild init passes it; a hand-written route must do the same.
See Customization.
better-sqlite3 has the wrong ABI
Section titled “better-sqlite3 has the wrong ABI”Native bindings are compiled for the Node that runs the install script. With
pnpm there is no bundled node-gyp, so the prebuild must match. Install with the
Node that runs the app and set the target:
PATH="$(dirname "$(node -p process.execPath)"):$PATH" \ npm_config_target="$(node -p process.versions.node)" \ npm_config_arch="$(node -p process.arch)" \ pnpm installThe scaffolder does this for you. If you use a version manager, make sure it
does not resolve a different Node inside node_modules.
Login fails with an origin error
Section titled “Login fails with an origin error”BETTER_AUTH_URL must match the browser origin exactly, including the port:
BETTER_AUTH_URL="http://localhost:3000"If you open the app from another host or port, update the variable and restart the dev server.
Prisma cannot connect
Section titled “Prisma cannot connect”If you use lerd, check that the database service is running; idle suspension can
stop it. lerd service start postgres or lerd service start mysql brings it
back. For a hosted database, check DATABASE_URL and DIRECT_URL and whether
the provider requires SSL.
Fonts look like Times New Roman
Section titled “Fonts look like Times New Roman”--font-sans is self-referencing or undefined. Define a real stack in
globals.css:
@theme inline { --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;}Tailwind classes from the shell are missing
Section titled “Tailwind classes from the shell are missing”Tailwind must scan the package build. Add the source to your global CSS:
@source "../../node_modules/@dashild/admin/dist";Adjust the relative path if your CSS file is in a different folder.
Password reset emails are not sent
Section titled “Password reset emails are not sent”src/lib/email.ts logs the email in development and throws in production until
you configure a provider. Set RESEND_API_KEY and EMAIL_FROM (uncomment them
in .env), or replace sendEmail with your own transport.
A resource returns 404
Section titled “A resource returns 404”The policy entry is fail-closed. Check that the resource declares
policy: { scope: ... }, that policies.ts has an entry for the model under
resources, and that scope returns a where fragment instead of null. Run
pnpm dashild doctor for the exact file and line.
A project shows no resources in doctor
Section titled “A project shows no resources in doctor”doctor exits with code 1 when it finds no resources. Create one with
pnpm dashild make:resource <Model> or point --dir at the right folder.