Troubleshooting.
Fixes for the problems people hit most often while building with the prompts, running the app and deploying it.
The most common problems and their fixes. The download has the full guide, docs/TROUBLESHOOTING.md, and a table of deployment problems at the end of docs/DEPLOY.md.
While building with the prompts
Claude Code went a different way than the prompt
Tell it: “Follow the prompt exactly and the rules in AGENTS.md.” If a step is badly off, go back to your last commit (git reset --hard) and paste the prompt again.
A check keeps failing and Claude Code can't fix it
Paste the exact error and ask it to explain the cause before changing code. Then run only the failing check again. If it still fails, reset to the last commit and redo the step, if needed in a new Claude Code session.
The session got long or slow
Start a new Claude Code session in the same folder and paste the next prompt. Every prompt works from the code and AGENTS.md in your folder; it does not need the earlier conversation.
npm install changed versions
Step 01 pins exact versions. Use npm ci to install exactly what package-lock.json lists, and add new packages with npm install --save-exact.
better-sqlite3 fails to install
Use Node.js 22 LTS (nvm use 22). On Windows, install the “Desktop development with C++” build tools if no prebuilt binary is available; on Linux, build-essential and python3.
Browser checks hang in development
Open the dev server at http://localhost:<port>, not http://127.0.0.1:<port>: Next.js 16 blocks its development resources for other hostnames unless they are listed in allowedDevOrigins.
Running the app
“SESSION_SECRET” error on start
Set SESSION_SECRET in .env.local to a random string of at least 32 characters (openssl rand -base64 48). The placeholder from .env.example is rejected on purpose. Changing it later logs everyone out and changes every shared link.
Logged out right after logging in
In production the session cookie is secure-only, so it needs HTTPS (or http://localhost). Deploy behind HTTPS. For a quick local network test only, set COOKIE_SECURE=false.
“Too many attempts. Try again in 15 minutes.”
That is the brute-force protection: 5 failed logins for one email, or 20 from one network, in 15 minutes. Behind your own reverse proxy, set TRUST_PROXY=true, or every visitor counts as the same network.
I can't edit a sent invoice or quote
Sent documents are locked on purpose. For a sent invoice without payments, use “Back to draft”. An invoice with payments must have them voided or refunded first. To cancel, use “Void”. Nothing financial is deleted.
Emails say “not configured” or stay queued
Set the SMTP_* lines in .env.local and restart. Settings › Email shows each message's status and last error, and has a “Send test email” button. Queued emails are retried by npm run jobs.
Recurring invoices or reminders don't appear
They are created by npm run jobs, which should run every 15 minutes (see the deployment guide). Owners can also press “Run now” on the Recurring page.
A Stripe payment didn't mark the invoice paid
Only Stripe's signed webhook records card payments. Check the webhook URL (APP_URL/api/stripe/webhook), the event checkout.session.completed and STRIPE_WEBHOOK_SECRET. The Stripe dashboard shows each delivery and its response.
Dates or “overdue” look one day off
Set your time zone in Settings. “Today”, overdue, reminders, recurring dates and monthly totals use it, not the server's clock.
Deploying and backups
Data or receipts disappear after a redeploy
DATABASE_PATH or UPLOADS_PATH is inside the app folder or on a disk that is wiped. Put both on a persistent disk outside the code. Serverless hosts that don't keep files are not supported.
A backup is empty or corrupt
The database was probably copied with cp while the app was running. Use npm run db:backup, which is safe while the app runs and includes the uploads, and check it with npm run db:restore-check.
npm run build stops with “Killed”
Not enough memory for the build. Use a VPS with 4 GB RAM, or add the swap file from section 1 of the deployment guide.
Still stuck?
Email support@layerva.io with the step number, the exact error and your node -v. Please don't send passwords, API keys, .env files or your database. More on the support page.