Skip to content

pnpm run setup fails on Windows PowerShell/CMD because setup uses rm -rf #7184

Description

@scrollDynasty

Describe the bug

pnpm run setup fails on Windows PowerShell/CMD because the root setup script uses the Unix-specific command rm -rf.

Current setup script:

"setup": "rm -rf node_modules packages/*/node_modules && pnpm install && pnpm prebundle && pnpm build"

The contributing guide asks contributors to run pnpm run setup, but it does not mention that Windows users need Git Bash or WSL.

Environment:

  • OS: Windows
  • Shell: PowerShell
  • Node.js: v22.22.2
  • pnpm: 8.9.2

Steps to reproduce:

  1. Clone the repository on Windows.
  2. Open the project in PowerShell or CMD.
  3. Run pnpm run setup.
  4. The command fails when it reaches rm -rf.

Actual behavior:

The setup command relies on a Unix-specific cleanup command, so it fails in Windows PowerShell/CMD.

Possible solution:

Since the repository already uses rimraf in other scripts, the setup command could potentially replace rm -rf with rimraf.

For example:

"setup": "rimraf node_modules packages/*/node_modules && pnpm install && pnpm prebundle && pnpm build"

I can work on a PR if this change is acceptable.

Expected behavior

pnpm run setup should either work cross-platform on Windows/macOS/Linux, or the contributing guide should clearly mention that Windows contributors need to use Git Bash or WSL.

Actual behavior

pnpm run setup fails on Windows PowerShell/CMD when it reaches the rm -rf command.

The root setup script currently uses a Unix-specific cleanup command:

"setup": "rm -rf node_modules packages/*/node_modules && pnpm install && pnpm prebundle && pnpm build"

Since rm -rf is not available in Windows PowerShell/CMD, contributors on Windows cannot complete the documented setup flow unless they switch to Git Bash or WSL.

Version of ice.js

master branch / latest commit

Content of build.json or ice.config.mts

Not applicable. This issue is related to the repository setup script in the root package.json.

Additional context

This affects the contributor setup experience on Windows.

A possible fix could be replacing rm -rf with a cross-platform alternative. Since the repository already uses rimraf in other scripts, the setup command could potentially use:

"setup": "rimraf node_modules packages/*/node_modules && pnpm install && pnpm prebundle && pnpm build"

I can work on a PR if this change is acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions