Skip to content

fix: resolve Windows compatibility issues in compile-js plugin#507

Open
idpcks wants to merge 1 commit intothecodingmachine:mainfrom
idpcks:fix/windows-compatibility-plugin
Open

fix: resolve Windows compatibility issues in compile-js plugin#507
idpcks wants to merge 1 commit intothecodingmachine:mainfrom
idpcks:fix/windows-compatibility-plugin

Conversation

@idpcks
Copy link

@idpcks idpcks commented Feb 27, 2026

Problem

When initializing the boilerplate on Windows, the post-init script
fails with spawnSync yarn ENOENT error.

Root Cause

  1. execSync and spawnSync calls missing shell: true option,
    causing Windows to fail resolving PATH for yarn/npm binaries.
  2. Unix commands (cp, rm -rf) are not available on Windows
    Command Prompt.

Fix

  1. Added shell: true to all execSync and spawnSync calls.
  2. Replaced Unix commands with Node.js native fs.cpSync and
    fs.rmSync for cross-platform compatibility.

Tested on

  • Windows 11
  • Node.js v22.13.1
  • npm (without yarn installed)

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.

1 participant