formBuilder icon indicating copy to clipboard operation
formBuilder copied to clipboard

Husky install fails when doing npm install on a tarball release

Open lucasnetau opened this issue 5 months ago • 3 comments

When building formBuilder from a tarball or via Composer (PHP) the npm install command fails with the following error due to no .git directory.

husky - .git can't be found (see https://typicode.github.io/husky/#/?id=custom-directory)
npm error code 1
npm error path /Users/mjlucas/Version Control/auditwatch/vendor/kevinchappell/form-builder
npm error command failed
npm error command sh -c [ "$NODE_ENV" = production ] && exit 0; husky install

Later versions of Husky detect when running in a CI and skip installation, a newer version may also detect no .git directory

lucasnetau avatar Jun 19 '25 06:06 lucasnetau

@kevinchappell could you please look into this as you added in the Husky dependancy. I don't know if we should expand the prepare script check to verify if a .git directory exists or if a newer version rectifies this issue.

lucasnetau avatar Jun 19 '25 06:06 lucasnetau

Yeah husky shouldn't be running in CI. I'll see why it is.

kevinchappell avatar Jun 19 '25 08:06 kevinchappell

ok now that i re-read the error i think i understand better.

kevinchappell avatar Jun 21 '25 16:06 kevinchappell

:tada: This issue has been resolved in version 3.20.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Aug 13 '25 19:08 github-actions[bot]