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.

@gr2m gr2m added ai/core ai/provider provider/amazon-bedrock Issues related to the @ai-sdk/amazon-bedrock provider provider/anthropic provider/assemblyai Issues related to the @ai-sdk/assemblyai provider provider/azure provider/cerebras Issues related to the @ai-sdk/cerebras provider provider/cohere Issues related to the @ai-sdk/cohere provider provider/deepgram Issues related to the @ai-sdk/deepgram provider provider/deepinfra Issues related to the @ai-sdk/deepinfra provider provider/deepseek Issues related to the @ai-sdk/deepseek provider provider/elevenlabs Issues related to the @ai-sdk/elevenlabs provider provider/fal Issues related to the @ai-sdk/fal provider provider/fireworks Issues related to the @ai-sdk/fireworks provider provider/gateway Issues related to the @ai-sdk/gateway provider provider/gladia Issues related to the @ai-sdk/gladia provider provider/google provider/google-vertex Issues related to the @ai-sdk/google-vertex provider provider/groq Issues related to the @ai-sdk/groq provider provider/hume Issues related to the @ai-sdk/hume provider provider/lmnt Issues related to the @ai-sdk/lmnt provider provider/luma Issues related to the @ai-sdk/luma provider provider/mistral Issues related to the @ai-sdk/mistral provider labels Nov 7, 2025
@gr2m gr2m added maintenance and removed provider/deepinfra Issues related to the @ai-sdk/deepinfra provider provider/deepseek Issues related to the @ai-sdk/deepseek provider provider/elevenlabs Issues related to the @ai-sdk/elevenlabs provider provider/fal Issues related to the @ai-sdk/fal provider provider/fireworks Issues related to the @ai-sdk/fireworks provider provider/gateway Issues related to the @ai-sdk/gateway provider provider/gladia Issues related to the @ai-sdk/gladia provider provider/google-vertex Issues related to the @ai-sdk/google-vertex provider provider/groq Issues related to the @ai-sdk/groq provider provider/hume Issues related to the @ai-sdk/hume provider provider/lmnt Issues related to the @ai-sdk/lmnt provider provider/luma Issues related to the @ai-sdk/luma provider provider/mistral Issues related to the @ai-sdk/mistral provider provider/perplexity Issues related to the @ai-sdk/perplexity provider provider/replicate Issues related to the @ai-sdk/replicate provider provider/revai Issues related to the @ai-sdk/revai provider provider/togetherai Issues related to the @ai-sdk/togetherai provider provider/vercel Issues related to the @ai-sdk/vercel provider labels Nov 7, 2025
@gr2m gr2m self-assigned this Nov 7, 2025
@gr2m gr2m enabled auto-merge (squash) November 7, 2025 20:59
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.

sorry it took so long. Thank you again for your contributions!

@gr2m gr2m merged commit e04dcf5 into vercel:main Nov 7, 2025
17 of 18 checks passed
@gr2m gr2m added the backport label Nov 7, 2025
vercel-ai-sdk bot pushed a commit that referenced this pull request Nov 7, 2025
@vercel-ai-sdk vercel-ai-sdk bot removed the backport label Nov 7, 2025
@vercel-ai-sdk
Copy link
Contributor

vercel-ai-sdk bot commented Nov 7, 2025

⚠️ Backport to release-v5.0 created but has conflicts: #10078

gr2m added a commit that referenced this pull request Nov 7, 2025
…-rf with del-cli) (#10078)

This is an automated backport of #8497 to the release-v5.0 branch.

---------

Co-authored-by: Tayyab3245 <tmalik3245@gmail.com>
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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