8.4 KiB
Windows Troubleshooting Guide
Overview
This guide addresses common issues when running the Shopify Price Updater TUI on Windows systems and provides solutions for optimal performance.
Terminal Compatibility
Recommended Terminals
Windows Terminal (Best Experience)
- Download: Microsoft Store or GitHub releases
- Features: Full Unicode support, true color, modern key handling
- Configuration: No additional setup required
PowerShell 7+ (Good Experience)
- Download: GitHub releases or Windows Package Manager
- Features: Good Unicode support, color support
- Setup:
winget install Microsoft.PowerShell
Command Prompt (Basic Experience)
- Features: Limited color support, basic functionality
- Limitations: No Unicode characters, limited colors
Terminal Setup
Enable UTF-8 Support
chcp 65001
PowerShell Profile Setup
Add to your PowerShell profile ($PROFILE):
# Enable UTF-8 encoding
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
[Console]::InputEncoding = [System.Text.Encoding]::UTF8
# Set console to support ANSI escape sequences
$Host.UI.RawUI.WindowTitle = "PowerShell"
Common Issues and Solutions
Issue: Unicode Characters Not Displaying
Symptoms:
- Boxes, question marks, or missing characters in the TUI
- Progress bars showing incorrect characters
Solutions:
-
Set Console Code Page:
chcp 65001 npm run tui -
Windows Terminal Configuration:
{ "profiles": { "defaults": { "fontFace": "Cascadia Code", "fontSize": 12 } } } -
PowerShell Configuration:
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
Issue: Colors Not Working
Symptoms:
- No colors in the interface
- All text appears in default terminal color
Solutions:
-
Enable ANSI Support (Windows 10+):
reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1 -
Use Windows Terminal:
- Download from Microsoft Store
- Automatically supports modern color features
-
PowerShell Color Support:
# Check if colors are supported $Host.UI.SupportsVirtualTerminal
Issue: Keyboard Input Problems
Symptoms:
- Arrow keys not working
- Special keys producing unexpected characters
- Navigation not responding
Solutions:
-
Windows Terminal (Recommended):
- Use Windows Terminal for best keyboard support
- Supports all modern key sequences
-
PowerShell ISE Alternative:
- Don't use PowerShell ISE - use regular PowerShell or Windows Terminal
-
Command Prompt Limitations:
- Limited key support - consider upgrading to Windows Terminal
Issue: Performance Problems
Symptoms:
- Slow rendering
- Flickering interface
- High CPU usage
Solutions:
-
Windows Terminal Optimization:
{ "profiles": { "defaults": { "useAcrylic": false, "acrylicOpacity": 1.0 } } } -
Disable Windows Defender Real-time Scanning:
- Add Node.js to exclusions
- Add project directory to exclusions
-
Close Unnecessary Applications:
- Free up system resources
- Close other terminal windows
Issue: Font and Display Problems
Symptoms:
- Misaligned text
- Incorrect character spacing
- Overlapping text
Solutions:
-
Use Monospace Fonts:
- Cascadia Code (recommended)
- Consolas
- Courier New
-
Windows Terminal Font Configuration:
{ "profiles": { "defaults": { "fontFace": "Cascadia Code", "fontSize": 12, "fontWeight": "normal" } } } -
Adjust Terminal Size:
- Ensure minimum 80x24 characters
- Avoid very small terminal windows
Windows-Specific Features
Windows Terminal Integration
The TUI includes specific optimizations for Windows Terminal:
- True Color Support: Full 24-bit color palette
- Unicode Rendering: Enhanced character support
- Mouse Support: Click interactions where appropriate
- Resize Handling: Automatic layout adjustment
PowerShell Integration
- Profile Integration: Works with PowerShell profiles
- Module Loading: Compatible with PowerShell modules
- Error Handling: Windows-specific error messages
Command Prompt Compatibility
- Graceful Degradation: Reduced features for compatibility
- Basic Colors: Limited color palette
- Essential Functions: Core functionality maintained
Environment Variables
Windows-Specific Settings
# Windows Terminal optimization
FORCE_COLOR=1
NO_COLOR=0
# Console encoding
PYTHONIOENCODING=utf-8
PowerShell Environment
# Set in PowerShell profile
$env:FORCE_COLOR = "1"
$env:NO_COLOR = "0"
Installation Issues
Node.js Version Problems
Issue: TUI fails to start with Node.js version errors
Solution:
# Check Node.js version
node --version
# Should be 16.0.0 or higher
# Update if necessary from nodejs.org
NPM Permission Issues
Issue: Permission denied errors during npm install
Solutions:
-
Run as Administrator:
# Right-click Command Prompt/PowerShell # Select "Run as administrator" npm install -
Configure NPM Prefix:
npm config set prefix %APPDATA%\npm
Dependency Installation Problems
Issue: Native module compilation failures
Solutions:
-
Install Build Tools:
npm install -g windows-build-tools -
Visual Studio Build Tools:
# Download from Microsoft # Install C++ build tools
Performance Optimization
Windows Terminal Settings
{
"profiles": {
"defaults": {
"useAcrylic": false,
"scrollbarState": "hidden",
"snapOnInput": true,
"historySize": 9001
}
},
"rendering": {
"forceFullRepaint": false,
"software": false
}
}
System Optimization
-
Disable Visual Effects:
- Control Panel → System → Advanced → Performance → Adjust for best performance
-
Power Settings:
- Set to "High Performance" mode
-
Background Apps:
- Disable unnecessary background applications
Debugging
Enable Debug Mode
set DEBUG=shopify-price-updater:*
npm run tui
Log Collection
# Redirect output to file
npm run tui > debug.log 2>&1
System Information
# Collect system info
systeminfo > system-info.txt
node --version >> system-info.txt
npm --version >> system-info.txt
Advanced Configuration
Registry Settings
# Enable ANSI escape sequences (Windows 10+)
reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1
# Disable QuickEdit mode (prevents accidental pausing)
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 0
Windows Terminal Custom Actions
{
"actions": [
{
"command": {
"action": "sendInput",
"input": "npm run tui\r"
},
"keys": "ctrl+shift+t"
}
]
}
Getting Help
Information to Collect
When reporting Windows-specific issues, include:
-
Windows Version:
winver -
Terminal Information:
echo $env:TERM -
Node.js Version:
node --version npm --version -
Error Messages:
- Full error output
- Stack traces if available
Support Resources
- Windows Terminal Issues: GitHub repository
- PowerShell Issues: PowerShell GitHub repository
- Node.js Issues: Node.js support channels
- Application Issues: Project repository
Best Practices
Development Environment
- Use Windows Terminal for the best experience
- Keep Node.js Updated to the latest LTS version
- Use PowerShell 7+ instead of Windows PowerShell 5.1
- Configure UTF-8 Encoding in your terminal profile
Production Usage
- Test in Target Environment before deployment
- Document Terminal Requirements for end users
- Provide Fallback Instructions for older terminals
- Monitor Performance on target systems
Maintenance
- Regular Updates of terminal applications
- Monitor Windows Updates that might affect terminal behavior
- Keep Dependencies Updated for security and compatibility
- Test After System Updates to ensure continued functionality