-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Description
Windows compatibility: Unix commands (rm, cp) prevent yarn install and yarn dx from working
Description
Windows developers cannot successfully run yarn install or yarn dx due to Unix-specific shell commands (rm, cp, cd) in multiple package.json scripts. Issue #14445 previously addressed this in @calcom/embed-core, but the same problem exists in 8+ other packages, still blocking Windows development.
Environment
- OS: Windows 10/11
- Shell: PowerShell, CMD, Git Bash
- Node.js: v20.x
- Yarn: 3.4.1
Steps to Reproduce
- Clone the repository on Windows
- Run
yarn install - Observe error:
'rm' is not recognized as an internal or external command
@calcom/platform-enums:post-install: 'rm' is not recognized as an internal or external command,
@calcom/platform-enums:post-install: operable program or batch file.
@calcom/platform-enums:post-install: command not found: rm
@calcom/platform-enums:post-install: ERROR: command finished with error
- Alternatively, after manually fixing and running
yarn dx:
@calcom/prisma:db-up: unknown shorthand flag: 'd' in -d
@calcom/prisma:db-up: command not found: rm
Affected Packages
The following packages contain Unix-only commands that fail on Windows:
Build Scripts (block yarn install):
@calcom/platform-enums-rm -rf ./dist@calcom/platform-types-rm -rf ./dist@calcom/embed-core-rm -rf dist,cp -r@calcom/embed-react-rm -rf dist,cp@calcom/embed-snippet-rm -rf dist
Clean Scripts (manually invoked):
@calcom/web-rm -rf .turbo && rm -rf node_modules@calcom/api(v1) -rm -rf .turbo && rm -rf node_modules@calcom/prisma-rm -rf .turbo && rm -rf node_modules,cd ../..in db-up
Additional Issues:
packages/prisma/.envcontains../../.envwhich Docker Compose cannot parse on Windowsdocker-compose.ymlmissing database port mapping (DATABASE_URL expects port 5450)
Expected Behavior
yarn installshould complete successfully on Windowsyarn dxshould start development environment on Windows- All build scripts should work cross-platform
Proposed Solution
Replace Unix-specific commands with cross-platform alternatives:
Option 1: Use Node.js fs module (zero dependencies)
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && vite build"
"clean": "node -e \"require('fs').rmSync('.turbo',{recursive:true,force:true})\""Option 2: Use rimraf package (as suggested in #14445)
"build": "rimraf dist && vite build"Related Issues
- yarn build problem #14445 - Fixed
@calcom/embed-corebut didn't address other packages - This issue extends yarn build problem #14445 to cover all remaining Unix command usage
Impact
- Severity: High - Blocks Windows developers from contributing
- Scope: Affects initial setup (
yarn install) and development (yarn dx) - Workaround: Use WSL or Git Bash (not ideal, adds friction)
Additional Context
Windows has significant market share among developers, and cross-platform compatibility is essential for an open-source project. The fix is straightforward and has zero impact on Unix/macOS users.
I have a PR ready with all fixes tested on Windows 11.