Skip to content

Bug: postinstall script fails on Windows #610

@chrille0313

Description

@chrille0313

Description

The pgflow package's postinstall script fails on Windows, preventing installation via npm install pgflow or npx pgflow@latest install.

Steps to reproduce

  1. On Windows (PowerShell or cmd), run: npx pgflow@latest install
  2. Or: npm install -g pgflow@latest

Expected behavior

Installation completes successfully.

Actual behavior

Installation fails with:

npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c chmod +x dist/index.js || true
npm error 'chmod' is not recognized as an internal or external command,
npm error operable program or batch file.
npm error 'true' is not recognized as an internal or external command,
npm error operable program or batch file.

Root cause

The postinstall script runs chmod +x dist/index.js || true — Unix commands that don't exist on Windows.

Workaround

Install with scripts disabled, then run the CLI:

npm install pgflow@latest --ignore-scripts
npx pgflow install

Environment

  • OS: Windows 10/11
  • Node: v24.12.0 (also reproducible on other versions)
  • npm: latest

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