Problem
Installing this package the way the pi coding agent installs git-based extensions fails on Windows:
> npm install --omit=dev
npm notice run pi-agenticoding@0.4.0 prepare
npm notice run husky
'husky' is not recognized as an internal or external command,
operable program or batch file.
npm error code 1
npm error path <checkout>
npm error command failed
npm error command C:\windows\system32\cmd.exe /d /s /c husky
pi update --extensions runs npm install --omit=dev in the git checkout of every git-based extension (see getGitDependencyInstallArgs() in @earendil-works/pi-coding-agent's dist/core/package-manager.js, which returns ["install", "--omit=dev"]). Since husky is only listed under devDependencies, it is never installed with --omit=dev, yet the prepare lifecycle script still runs the bare husky command → command not found → the install aborts.
Suggested fix
Make the prepare script resilient when husky isn't installed (e.g. under --omit=dev):
"prepare": "node -e \"try{require('node:child_process').execSync('husky',{stdio:'inherit'})}catch{process.exit(0)}\""
This runs husky when it is present (normal development workflow) and no-ops otherwise (managed/CI installs). Alternatively, move the git-hook setup out of prepare, or drop it entirely since consumers of the package don't need the repo's git hooks.
Environment
- Windows 11 (10.0.26200)
- node v24.19.0, npm 12.0.1
- Reproduced with
pi update --extensions and with a plain npm install --omit=dev inside the checkout.
Problem
Installing this package the way the pi coding agent installs git-based extensions fails on Windows:
pi update --extensionsrunsnpm install --omit=devin the git checkout of every git-based extension (seegetGitDependencyInstallArgs()in@earendil-works/pi-coding-agent'sdist/core/package-manager.js, which returns["install", "--omit=dev"]). Sincehuskyis only listed underdevDependencies, it is never installed with--omit=dev, yet thepreparelifecycle script still runs the barehuskycommand → command not found → the install aborts.Suggested fix
Make the
preparescript resilient whenhuskyisn't installed (e.g. under--omit=dev):This runs husky when it is present (normal development workflow) and no-ops otherwise (managed/CI installs). Alternatively, move the git-hook setup out of
prepare, or drop it entirely since consumers of the package don't need the repo's git hooks.Environment
pi update --extensionsand with a plainnpm install --omit=devinside the checkout.