Documentation Index
Fetch the complete documentation index at: https://mintlify.com/21st-dev/1code/llms.txt
Use this file to discover all available pages before exploring further.
Installation Issues
Error: Could not find module 'better-sqlite3'
Error: Could not find module 'better-sqlite3'
This error occurs when native modules are not properly rebuilt after installation.Solution:
On macOS, make sure you have Xcode Command Line Tools installed:
Python setuptools error during install
Python setuptools error during install
On Python 3.12+,
setuptools is not included by default and is required for native module rebuilds.Solution:Missing Claude or Codex binaries
Missing Claude or Codex binaries
If the app builds but agents don’t work, you likely skipped downloading the required agent binaries.Solution:
Bun not found or version mismatch
Bun not found or version mismatch
1Code requires Bun as the package manager and build tool.Solution:
Build & Packaging Issues
Electron build fails with code signing error (macOS)
Electron build fails with code signing error (macOS)
This usually happens when building production packages without proper code signing setup.Solution for development:
Use the dev package command which doesn’t require signing:Solution for distribution:
Set up code signing with your Apple Developer certificate. See the electron-builder docs for details.
ASAR packaging errors
ASAR packaging errors
Native modules (better-sqlite3, node-pty) must be unpacked from ASAR archives.Verify unpacking configuration in package.json:If you add new native dependencies, make sure to add them to this list.
dist:manifest script fails
dist:manifest script fails
The manifest generation script requires that the build artifacts exist.Solution:
Runtime Issues
Database migration errors on startup
Database migration errors on startup
Database auto-migration runs on app startup. If it fails, your database may be corrupted.Solution:
OAuth deep link not working (first install)
OAuth deep link not working (first install)
On macOS, Launch Services may not immediately recognize protocol handlers on first app launch.Solution:
- Close and reopen the app
- Try clicking “Sign in” again
- If it still doesn’t work, re-register protocol handlers:
Git worktree errors
Git worktree errors
Worktree operations can fail if the git repository is in an inconsistent state.Common causes:
- Uncommitted changes in main branch
- Existing worktree with the same name
- Insufficient disk space
Agent sessions not resuming
Agent sessions not resuming
Session IDs are stored in the database. If the database is corrupted or the session expired, it won’t resume.Solution:
- Start a new chat session
- Check that the project folder still exists
- Verify the worktree hasn’t been manually deleted
Terminal not working or blank
Terminal not working or blank
node-pty issues can cause terminal problems.Solution:On Linux, make sure you have the required dependencies:
Development Mode Issues
Hot reload not working
Hot reload not working
electron-vite handles hot reload for renderer and preload processes.Solution:
- Make sure you’re using
bun run devnotbun run build - Check the terminal for any compilation errors
- Try restarting the dev server
Changes not appearing in dev mode
Changes not appearing in dev mode
If you modify main process code, you need to restart the entire app.Solution:
- Stop
bun run dev(Ctrl+C) - Run
bun run devagain - Renderer process changes hot reload automatically
DevTools console errors
DevTools console errors
Open DevTools with Cmd+Option+I (macOS) or Ctrl+Shift+I (Windows/Linux).Common errors:
- CORS errors: Check that your backend server is running
- Import errors: Verify file paths and check for typos
- State errors: Check Jotai/Zustand state initialization
Debug Mode
For runtime issues that are hard to reproduce, use the structured debug logging system.See
packages/debug/INSTRUCTIONS.md for the full debug protocol.Getting Help
If you’re still stuck after trying these solutions:Join Discord
Get real-time help from the community and core team
GitHub Issues
Report bugs or request features
GitHub Discussions
Ask questions and share solutions
Support
Learn about other support options