Troubleshooting
This guide helps you resolve common issues when developing for Actual.
Type Errors
Issue: TypeScript compilation errors
Solution:
- Run
yarn typecheckto see all type errors - Check if types are imported correctly
- Look for existing type definitions in
packages/loot-core/src/types/ - Use
satisfiesinstead ofasfor type narrowing
Issue: Cannot find module or type definitions
Solution:
- Check
tsconfig.jsonfor path mappings - Ensure you're using the correct import path for the package
- Run
yarn installto ensure all dependencies are installed
Linter Errors
Issue: ESLint or Prettier errors
Solution:
- Run
yarn lint:fixto auto-fix many issues - Check ESLint output for specific rule violations and fix them
Test Failures
Issue: Tests fail unexpectedly
Solution:
- Check if test is running in correct environment (node vs web)
- Lage cache issues: Clear cache with
rm -rf .lageif tests behave unexpectedly
Issue: E2E tests fail
Solution:
- Ensure Playwright browsers are installed:
yarn workspace @actual-app/web run playwright install - Run tests with headed browser for debugging:
yarn workspace @actual-app/web run playwright test --headed --debug
Import Resolution Issues
Issue: Platform-specific import errors
Solution:
- Don't directly reference platform-specific imports (
.api,.web,.electron) - Use conditional exports in
loot-corefor platform-specific code
Build Failures
Issue: Build fails with errors
Solution:
- Clean build artifacts:
rm -rf packages/*/dist packages/*/lib-dist packages/*/build - Reinstall dependencies:
yarn install - Check Node.js version (requires >=22):
node --version - Check Yarn version (requires ^4.9.1):
yarn --version
Issue: Native module build failures (better-sqlite3)
Solution:
- On Windows: Ensure you selected "Automatically install the necessary tools" during Node.js installation
- Run
yarn rebuild-electronfor Electron builds - Run
yarn workspace loot-core rebuildfor Node.js builds - Ensure you have the necessary build tools installed (Python, Visual Studio Build Tools on Windows)
Development Server Issues
Issue: Development server won't start
Solution:
- Check if port is already in use
- Ensure all dependencies are installed:
yarn install - Try clearing node_modules and reinstalling:
rm -rf node_modules packages/**/node_modules
yarn install - Check for error messages in the console
Issue: Hot reload not working
Solution:
- Ensure you're running the correct development command
- Check if file watchers are working (may be limited on some systems)
- Try restarting the development server
- Check for file system permission issues
Workspace Command Issues
Issue: Workspace command not found
Solution:
- Ensure you're running commands from the root directory
- Verify workspace name is correct:
yarn workspaces list - Check package.json for available scripts
- Use correct workspace alias (e.g.,
@actual-app/webinstead ofdesktop-client)
Git Issues
Issue: Pre-commit hooks failing
Solution:
- Ensure Husky is set up:
yarn prepare - Run linting manually:
yarn lint:fix - Run type checking:
yarn typecheck - Fix any errors before committing
Environment Issues
Issue: Wrong Node.js or Yarn version
Solution:
- Check required versions in
package.json:- Node.js: >=22
- Yarn: ^4.9.1
- Use a version manager:
- nvm for Node.js
- Yarn version is managed by the
packageManagerfield
- Update your environment to match requirements
Getting Help
If you're still experiencing issues:
- Check the Development Setup Guide for setup instructions
- Review the Testing Guide for test-related issues
- Check the Code Style Guide for code-related issues
- Ask for help in the Discord community
- Search or create an issue on GitHub