Skip to content

Conversation

tayyab3245
Copy link
Contributor

Fixes #8496

  • Updated all package.json clean scripts: rm -rf → del-cli
  • Added del-cli as dev dependency at workspace root
  • No runtime code changes, dev-only cross-platform fix
  • Verified on Windows: clean/build/test now work vs previous rm errors

Background

On Windows, rm is not available by default, causing all clean/build/test commands to fail with 'rm' is not recognized as an internal or external command. This completely blocks Windows contributors and CI runners from using the development toolchain.

The issue affects 40+ packages across the monorepo, all using rm -rf in their clean scripts. @gr2m recommended the del-cli approach in the issue comments.

Summary

Replaced Unix-only rm -rf commands with cross-platform del-cli in all package.json clean scripts:

  • Before: "clean": "rm -rf dist *.tsbuildinfo"
  • After: "clean": "del-cli dist *.tsbuildinfo"

Added del-cli as a dev-only dependency at the workspace root. No runtime code changes, no published API changes.

Manual Verification

Before this PR (Windows PowerShell):

pnpm run clean
# Error: 'rm' is not recognized as an internal or external command

After this PR (Windows PowerShell):

pnpm run clean    #  Works - cleans dist and .tsbuildinfo files
pnpm build        #  Works - builds successfully after clean
pnpm test         #  Works - 79/80 packages pass (RSC fails due to Playwright setup, unrelated)

Cross-platform verification:

  • Unix/macOS behavior unchanged (del-cli works identically to rm -rf)
  • All lint/type-check validations pass

Tasks

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)
  • I have reviewed this pull request (self-review)

Future Work

None required. This is a complete fix for the Windows compatibility issue.

Related Issues

Fixes #8496

Copy link
Collaborator

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tayyab3245! CI is currently failing and there is a merge conflict, could you please look at these? Let me know if you need any help

@tayyab3245 tayyab3245 force-pushed the fix/windows-rm-rf-compatibility branch 2 times, most recently from e6d7ef2 to 45ded77 Compare September 8, 2025 23:17
…el-cli)

Fixes vercel#8496

- Updated all package.json clean scripts: rm -rf  del-cli
- Added del-cli as dev dependency at workspace root
- No runtime code changes, dev-only cross-platform fix
- Verified on Windows: clean/build/test now work vs previous rm errors
@tayyab3245 tayyab3245 force-pushed the fix/windows-rm-rf-compatibility branch from 45ded77 to 2973992 Compare September 8, 2025 23:21
@tayyab3245
Copy link
Contributor Author

tayyab3245 commented Sep 8, 2025

Hi @gr2m,

I've updated the PR and completed the investigation into the CI failures.

This PR's Fix: This PR correctly fixes the Windows build-blocker #8496 by replacing rm -rf with del-cli. This is a necessary change for cross-platform compatibility.

CI Test Failures: The CI failures are caused by a separate, pre-existing issue (#8469) related to how test utilities import vitest. This is unrelated to the changes in this PR. My initial bug report (#8518) incorrectly diagnosed this as a React version mismatch, but we've since confirmed #8469 is the true root cause.

This PR is ready for review. It resolves the critical build failure, and the remaining CI errors are tracked by the separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Windows compatibility issue: rm -rf command not available on Windows
2 participants