Skip to content

workshop-frontend build cannot run its clean task on Windows #250

Description

@snowyukitty

Summary

On Windows, the workshop-frontend Vite+ build task cannot get past its clean:dist dependency because that task asks Vite+ to execute the POSIX rm binary directly.

This also prevents the repository's required pnpm lint command from completing on Windows.

Reproduction

At 3562627 on Windows 11, Node 24.19.0, and pnpm 11.17.0:

> pnpm exec vp run -F @gadgets/workshop-frontend --no-cache build

error: Failed to find executable rm under cwd <checkout>\packages\workshop-frontend
* cannot find binary path

The same failure occurs when the frontend task is reached through pnpm lint.

Cause

#212 added this Vite+ task:

'clean:dist': { command: 'rm -rf dist', cache: false },

Vite+ resolves the task command as an executable, and a normal Windows environment has no rm binary. The older clean package scripts are different: package-manager scripts go through their platform shell, while this task is launched by Vite+ directly.

Verified fix

Using Node's built-in filesystem API preserves the recursive, missing-path-tolerant cleanup without requiring a platform-specific executable:

command: `node -e "require('node:fs').rmSync('dist', { recursive: true, force: true })"`,

With that change on the same checkout:

  • the targeted frontend build completed, including both TypeScript checks and the production Vite bundle;
  • a stale sentinel placed under dist/ before the run was removed by clean:dist;
  • the full pnpm lint command completed successfully (existing warnings only).

AI tools assisted the investigation and drafting. The failure and verification results above were reproduced locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions