Troubleshooting
This guide helps you diagnose and resolve common issues with Launchpad. Most problems can be solved quickly with the right diagnostic commands.
Quick Diagnostics
Check Launchpad Status
# Verify Launchpad is installed and working
launchpad --version
# Check current configuration
launchpad list --verbose
# Test shell integration
type _pkgx_chpwd_hook || echo "Shell integration not working"Environment Status
# Check current environment
echo "Environment hash: $LAUNCHPAD_ENV_HASH"
echo "Project name: $LAUNCHPAD_PROJECT_NAME"
# List all environments
launchpad env:list
# Check for dependency files
ls -la {dependencies,pkgx,deps}.{yaml,yml} .{launchpad,pkgx,deps}.{yaml,yml} 2>/dev/nullInstallation Issues
Package Not Found
Symptoms:
- Error: "Package 'xyz' not found"
- Installation fails immediately
Solutions:
Check package name and version:
bash# Try different package name formats launchpad install node@22 # Standard format launchpad install nodejs.org@22 # With domain launchpad install node # Latest versionVerify with Launchpad's search:
bashlaunchpad search node launchpad info nodeUse verbose mode for details:
bashlaunchpad install --verbose node@22
Permission Denied Errors
Symptoms:
- "Permission denied" when installing
- "EACCES" errors
- Installation fails after asking for password
Solutions:
Check installation directory permissions:
bashls -la /usr/local/ ls -la ~/.local/Fix /usr/local permissions:
bashsudo chown -R $(whoami) /usr/local/bin /usr/local/sbinUse user-local installation:
bashlaunchpad install --path ~/.local node@22Verify PATH includes user directories:
bashecho $PATH | grep -E "(\.local/bin|\.local/sbin)"
Network/Download Issues
Symptoms:
- Timeouts during installation
- Download failures
- "Connection refused" errors
Solutions:
Check internet connection:
bashcurl -I https://pkgx.shIncrease timeout:
bashlaunchpad install --timeout 120000 node@22 # 2 minutesTry different mirror or later:
bash# Sometimes pkgx mirrors are temporarily down # Wait a few minutes and try again
Environment Issues
Environment Not Activating
Symptoms:
- No activation message when entering directories
- Environment variables not set
- Wrong package versions in project
Diagnosis:
Check shell integration:
bash# Should show function definition type _pkgx_chpwd_hook # Check shell config grep "launchpad dev:shellcode" ~/.zshrc ~/.bashrcVerify dependency file:
bash# Check file exists and has correct syntax cat dependencies.yaml launchpad dev:dump --dryrun --verboseTest manual activation:
bashlaunchpad dev:on
Solutions:
Set up shell integration:
bashecho 'eval "$(launchpad dev:shellcode)"' >> ~/.zshrc source ~/.zshrcFix dependency file syntax:
yaml# Correct format dependencies: - node@22 - python@3.12 env: NODE_ENV: developmentReload shell environment:
bashsource ~/.zshrc # Or restart your terminal
Shell Messages Not Showing
Symptoms:
- Environment activates but no messages appear
- Silent activation/deactivation
Solutions:
Check message settings:
bashecho $LAUNCHPAD_SHOW_ENV_MESSAGESEnable messages:
bashexport LAUNCHPAD_SHOW_ENV_MESSAGES=trueTest custom messages:
bashexport LAUNCHPAD_SHELL_ACTIVATION_MESSAGE="🔧 Environment ready: {path}" cd my-project/ # Should show custom message
Wrong Package Versions
Symptoms:
- Project uses global versions instead of project-specific
node --versionshows unexpected version
Solutions:
Check environment activation:
bashecho $LAUNCHPAD_ENV_HASH # Should not be empty which node # Should point to environment directoryVerify PATH order:
bashecho $PATH # Environment directories should come firstForce environment reload:
bashcd .. && cd - # Exit and re-enter directory
Performance Issues
Slow Environment Activation
Symptoms:
- Long delay when entering directories
- Slow command execution
Solutions:
Clean up old environments:
bashlaunchpad env:clean --older-than 7Check environment size:
bashlaunchpad env:list --verbose du -sh ~/.local/share/launchpad/envs/*Remove large/unused environments:
bashlaunchpad env:remove large_environment_hash --force
Disk Space Issues
Symptoms:
- "No space left on device" errors
- Installation failures due to disk space
Solutions:
Check disk usage:
bashdf -h ~/.local/share/launchpad/ du -sh ~/.local/share/launchpad/envs/*Clean up environments:
bash# Remove old environments launchpad env:clean --older-than 14 --force # Remove failed installations launchpad env:clean --forceUse custom location with more space:
bashexport LAUNCHPAD_ENV_BASE_DIR=/path/to/larger/disk
Configuration Issues
Configuration Not Loading
Symptoms:
- Custom settings ignored
- Default behavior despite configuration file
Solutions:
Check configuration file location:
bashls -la launchpad.config.{ts,js,json} .launchpadrc ls -la ~/.config/launchpad/config.jsonValidate configuration syntax:
bash# For TypeScript files bunx tsc --noEmit launchpad.config.ts # For JSON files cat .launchpadrc | python -m json.toolTest configuration loading:
bashlaunchpad --verbose list # Should show resolved config
Environment Variables Not Working
Symptoms:
- Custom environment variables not set
- Wrong values in project environment
Solutions:
Check dependency file:
bashcat dependencies.yaml # Verify env section syntaxTest variable expansion:
bashlaunchpad dev:dump --verbose echo $MY_CUSTOM_VARCheck for shell conflicts:
bash# Temporarily disable other shell customizations # and test Launchpad environment
Shell Integration Issues
Shell Integration Not Working
Symptoms:
- Commands like
cddon't trigger environment changes - Manual
launchpad dev:onworks but automatic doesn't
Solutions:
Check shell type:
bashecho $SHELL ps -p $$Verify integration code:
bashlaunchpad dev:shellcode # Should output shell functionsCheck for conflicts:
bash# Look for other tools that might interfere grep -E "(nvm|rbenv|pyenv)" ~/.zshrc ~/.bashrcReinstall shell integration:
bash# Remove old integration sed -i '/launchpad dev:shellcode/d' ~/.zshrc # Add fresh integration echo 'eval "$(launchpad dev:shellcode)"' >> ~/.zshrc source ~/.zshrc
Multiple Shell Conflicts
Symptoms:
- Environment doesn't activate in new shells
- Inconsistent behavior across terminals
Solutions:
Check all shell config files:
bashgrep "launchpad" ~/.zshrc ~/.bashrc ~/.bash_profile ~/.profileEnsure consistent integration:
bash# Add to all relevant shell configs for file in ~/.zshrc ~/.bashrc; do if [ -f "$file" ]; then echo 'eval "$(launchpad dev:shellcode)"' >> "$file" fi done
Starship Prompt Timeout Warnings
Symptoms:
- Warning messages like:
[WARN] - (starship::utils): Executing command "/.../bin/bun" timed out - Starship suggests:
You can set command_timeout in your config to a higher value - Timeout warnings when changing directories in projects
Cause: Starship tries to execute Launchpad-managed binaries (like bun, node, etc.) to detect tool versions for the prompt. When Launchpad's environment is activating, these binaries might take longer to respond than Starship's default timeout allows.
Solutions:
Increase Starship's command timeout (Recommended):
Add or update the
command_timeoutsetting in your Starship configuration file (~/.config/starship.toml):toml# Timeout for commands executed by starship (ms) command_timeout = 5000 # Rest of your Starship configuration... [git_branch] symbol = "🌱 " [bun] symbol = "🐰 "Test the fix:
bash# Restart your shell or source your config source ~/.zshrc # Change directories to trigger environment activation cd ~/my-projectAlternative: Disable specific modules:
If you don't need version detection for certain tools, you can disable them:
toml[bun] disabled = true [nodejs] disabled = true
Note: A 5000ms (5-second) timeout is generous and should eliminate timeout warnings while still keeping your prompt responsive. The actual execution time is typically under 1 second.
Uninstall/Cleanup Issues
Complete Removal
Symptoms:
- Want to completely remove Launchpad
- Start fresh after problems
Solutions:
Use uninstall command:
bashlaunchpad uninstall --forceManual cleanup:
bash# Remove packages rm -rf ~/.local/bin/pkgx ~/.local/bin/bun rm -rf ~/.local/share/launchpad/ # Remove shell integration sed -i '/launchpad/d' ~/.zshrc ~/.bashrc # Remove global package npm uninstall -g @stacksjs/launchpadClean PATH:
bash# Edit shell config to remove Launchpad paths # Restart terminal
Advanced Debugging
Enable Debug Mode
# Set debug environment variables
export LAUNCHPAD_DEBUG=true
export LAUNCHPAD_VERBOSE=true
# Run commands with maximum verbosity
launchpad --verbose install node@22Collect System Information
# System info for bug reports
echo "OS: $(uname -a)"
echo "Shell: $SHELL ($($SHELL --version))"
echo "Launchpad: $(launchpad --version)"
echo "Node: $(node --version 2>/dev/null || echo 'not installed')"
echo "Bun: $(bun --version 2>/dev/null || echo 'not installed')"
# Environment info
echo "PATH: $PATH"
echo "HOME: $HOME"
echo "PWD: $PWD"
env | grep LAUNCHPADLog Analysis
# Check system logs for Launchpad-related errors
grep -i launchpad /var/log/system.log # macOS
journalctl | grep -i launchpad # Linux systemdGetting Help
Community Support
- GitHub Discussions: stacksjs/launchpad discussions
- Discord: Join Stacks Discord
- Issues: Report bugs
Reporting Bugs
When reporting issues, include:
- System information (from Advanced Debugging section above)
- Exact error messages
- Steps to reproduce
- Expected vs actual behavior
- Configuration files (sanitized)
Service Management Issues
Service Won't Start
Symptoms: Service fails to start or immediately stops Diagnosis:
# Check if service binary is available
which postgres
which redis-server
# Check service logs
tail -f ~/.local/share/launchpad/logs/postgres.log
# Check port availability
lsof -i :5432 # Check if PostgreSQL port is in useCommon Causes:
- Missing binary: Install the service package first
- Port conflict: Another service is using the same port
- Permission issues: Data directory not writable
- Configuration errors: Invalid service configuration
Solutions:
# Install missing service packages
launchpad install postgresql@15
# Kill conflicting processes
sudo lsof -ti:5432 | xargs kill -9
# Fix data directory permissions
chown -R $USER ~/.local/share/launchpad/services/
# Reset service configuration
rm ~/.local/share/launchpad/services/config/postgres.conf
launchpad service start postgres # Regenerates default configService Health Check Failures
Symptoms: Service shows as "failed" or "unknown" status Diagnosis:
# Test health check manually
pg_isready -p 5432
redis-cli ping
# Check if health check tools are installed
which pg_isready
which redis-cliSolutions:
# Install missing health check tools
launchpad install postgresql@15 # Includes pg_isready
launchpad install redis@7 # Includes redis-cli
# Test service manually
telnet localhost 5432 # Test basic connectivityService Auto-Start Issues
Symptoms: Services don't start automatically Platform-Specific Diagnosis:
macOS (launchd)
# Check launchd status
launchctl list | grep com.launchpad
# Check plist file
cat ~/Library/LaunchAgents/com.launchpad.postgres.plist
# Manual launchd operations
launchctl load ~/Library/LaunchAgents/com.launchpad.postgres.plist
launchctl start com.launchpad.postgresLinux (systemd)
# Check systemd status
systemctl --user status launchpad-postgres
# Check service logs
journalctl --user -u launchpad-postgres
# Manual systemd operations
systemctl --user enable launchpad-postgres
systemctl --user start launchpad-postgresService Configuration Issues
Symptoms: Service starts but behaves incorrectly Diagnosis:
# Check generated configuration
cat ~/.local/share/launchpad/services/config/redis.conf
cat ~/.local/share/launchpad/services/config/nginx.conf
# Validate configuration syntax
nginx -t -c ~/.local/share/launchpad/services/config/nginx.confSolutions:
# Regenerate default configuration
rm ~/.local/share/launchpad/services/config/redis.conf
launchpad service restart redis
# Edit configuration manually
nano ~/.local/share/launchpad/services/config/redis.conf
launchpad service restart redisPlatform-Specific Service Issues
Windows
Service management is not supported on Windows. Services must be run manually:
# Run services manually on Windows
postgres -D data/
redis-server redis.confmacOS Permission Issues
# Grant full disk access to Terminal.app
# System Preferences > Security & Privacy > Privacy > Full Disk Access
# Check Console.app for launchd errors
# Applications > Utilities > Console.appLinux systemd Issues
# Enable systemd user services
sudo systemctl enable systemd-logind
loginctl enable-linger $USER
# Reload systemd configuration
systemctl --user daemon-reloadService Data and Log Issues
Symptoms: Services lose data or logs are missing Diagnosis:
# Check data directories
ls -la ~/.local/share/launchpad/services/
du -sh ~/.local/share/launchpad/services/*/
# Check log files
ls -la ~/.local/share/launchpad/logs/
tail -f ~/.local/share/launchpad/logs/*.logSolutions:
# Create missing directories
mkdir -p ~/.local/share/launchpad/services/postgres/data
mkdir -p ~/.local/share/launchpad/logs
# Fix permissions
chown -R $USER ~/.local/share/launchpad/
chmod -R 755 ~/.local/share/launchpad/
# Backup data before troubleshooting
tar -czf services-backup.tar.gz ~/.local/share/launchpad/services/Service Network and Port Issues
Symptoms: Can't connect to service ports Diagnosis:
# Check if ports are listening
netstat -an | grep 5432
lsof -i :5432
# Check firewall rules (Linux)
sudo ufw status
sudo iptables -L
# Test connectivity
telnet localhost 5432
curl http://localhost:8080/healthSolutions:
# Kill processes using conflicting ports
sudo lsof -ti:5432 | xargs kill -9
# Configure firewall (if needed)
sudo ufw allow 5432/tcp
# Change service port in configuration
nano ~/.local/share/launchpad/services/config/postgres.conf
# Change: port = 5433
launchpad service restart postgresService Management Commands Not Working
Symptoms: launchpad service commands fail Diagnosis:
# Check if service management is enabled
echo $LAUNCHPAD_SERVICES_ENABLED
# Check platform support
launchpad service list # Should show available servicesSolutions:
# Enable service management
export LAUNCHPAD_SERVICES_ENABLED=true
# On unsupported platforms, services must be run manually
# Use Docker or other container solutions for service managementSelf-Help Resources
- Built-in help:
launchpad help,launchpad <command> --help - Service documentation: Service Management
- Configuration reference: Configuration Guide
- Usage examples: Examples
- API documentation: API Reference
Remember: Most issues are quickly resolvable with the right diagnostic approach. Start with the Quick Diagnostics section and work your way through the relevant troubleshooting steps.