Windows Compatibility Guide
This Remix Stack has been updated to support Windows development environments. This guide covers the Windows-specific setup and troubleshooting.
Automatic Setup
The stack automatically configures Windows compatibility during installation:
- Cross-platform commands: Unix commands like
cp,mv, andrmare automatically made available through Windows command shims - ESM module resolution: Node.js options are configured to handle Windows path resolution properly
- Build script compatibility: All build and development scripts use cross-platform tools
Requirements
- Node.js: Version 20 or higher
- pnpm: Latest version (automatically detected during stack creation)
- Windows: Windows 11
What Gets Fixed Automatically
1. Unix Command Errors
Problem: Commands like cp "source" "dest" fail with "command not found"
Solution: Automatic creation of .cmd shims in node_modules/.bin/ that
use shx for cross-platform file operations
2. Path Separator Issues
Problem: Hard-coded Unix path separators cause failures Solution: All
scripts use cross-env for environment variable handling
Verification
After installation, you can verify Windows compatibility:
# Run the compatibility test
node scripts/test-windows-compatibility.js
# Check that shims were created (Windows only)
ls node_modules/.bin/*.cmd
Manual Setup (if needed)
If automatic setup fails, you can manually run:
# Install dependencies
pnpm install
# Run Windows setup script manually
node scripts/setup-win-commands.js
Troubleshooting
Issue: "cp is not recognized as an internal or external command"
Cause: Windows setup script didn't run or failed
Solution:
pnpm install # This should trigger postinstall script
# Or run manually:
node scripts/setup-win-commands.js
Issue: Build scripts fail with path errors
Cause: Path handling differences between Windows and Unix Solution: All
scripts now use cross-env for proper cross-platform environment handling
Development Commands
All standard commands work as expected on Windows:
# Development server
pnpm run dev
# Build the application
pnpm run build
# Run tests
pnpm run test
# Generate icons, routes, and API types
pnpm run icons
pnpm run generate-routes
pnpm run generate-api
Technical Details
The Windows compatibility includes:
- Command Shims:
.cmdfiles that wrap Unix commands withshx - Cross-platform Environment:
cross-envfor environment variable handling - Error Handling: Fallbacks for missing dependencies or script failures
If you encounter any Windows-specific issues not covered here, please report them to the team.