You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
I tried prepare as the way to setup Husky (cloned this repo, adjusted package.json and pushed dist directory to be able to use it as a dependency) but it looks like it breaks yarn install in our project when it's executed on clean project checkout (no node_modules/) with empty yarn cache.
Some people suggest it's due parallel fetching + git repo as a package source + "prepare" script combination, see yarnpkg/yarn#6312 (comment)
If I run yarn install --network-concurrency 1 then it succeeds. So seems like "concurrency issue" is valid explanation.
Probably prepare script will work if the package installed from the npm registry.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Yarn tries to run
husky install
as part ofpostinstall
script when installing this package as a dependency.To Reproduce
Expected behavior
The package being successfully installed.
Screenshots
Desktop:
Additional context
https://docs.npmjs.com/cli/v9/using-npm/scripts#npm-install
postinstall
is executed as a part of install by npm and yarn. Husky is a development dependency of this package which might not be true for project where this package is used.Now Husky project recommends to use
prepare
script to install hooks. See explanation at https://blog.typicode.com/husky-git-hooks-autoinstall/The text was updated successfully, but these errors were encountered: