Description
The pgflow package's postinstall script fails on Windows, preventing installation via npm install pgflow or npx pgflow@latest install.
Steps to reproduce
- On Windows (PowerShell or cmd), run:
npx pgflow@latest install
- 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
Description
The
pgflowpackage's postinstall script fails on Windows, preventing installation vianpm install pgflowornpx pgflow@latest install.Steps to reproduce
npx pgflow@latest installnpm install -g pgflow@latestExpected behavior
Installation completes successfully.
Actual behavior
Installation fails with:
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:
Environment