Repository navigation
Bug: postinstall script fails on Windows #610
Description
Current status
Verified against main on 2026-08-28: pkgs/cli/package.json still contains the failing postinstall script. PR #612 has the correct minimal removal, but it is based on v0.13.3 and needs a current patch changeset and full CI before merge. Refresh or recreate that PR rather than redesigning the fix.
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 installEnvironment
- OS: Windows 10/11
- Node: v24.12.0 (also reproducible on other versions)
- npm: latest
0.15.1 release verification
This fix is part of the release tracked by #666. Add a patch changeset and one small permanent windows-latest package smoke workflow rather than a full Windows CI matrix.
The Windows job must:
- build the CLI;
- create its publishable tarball with
pnpm pack; - install the tarball into a clean directory with lifecycle scripts enabled;
- run the npm-created
pgflow.cmd --versionshim.
The job needs no Supabase, Docker, Atlas, or full CLI E2E suite. Current CI runs only on Ubuntu and invokes node dist/index.js directly, so it does not test npm installation or Windows shims.
Activity
fix: remove postinstall chmod that breaks Windows npm install
fix(cli): remove Windows-breaking postinstall chmod (#669)
ci(windows): fix smoke install on release branches + 0.15.1 news arti…