-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Husky doesn't execute post install #788
Comments
facing exactly the same issue, I was going crazy! |
Appears to be an issue with v14.13.0 as well |
I think it's related to npm v7, I'd suggest using npm v6 until v7 becomes Alternatively it seems like husky v5 doesn't have this issue with |
I can confirm the difference is npm 6 vs 7, regardless of node version. Possibly related: |
npm v7 has intentionally suppressed all postinstall output, to avoid spam. Generally, postinstall is meant only for compilation, and not for husky’s automatic security-bypassing hook-installing behavior - I’m not sure what workarounds for you exist. |
Suppressing output is quite different from suppressing execution. |
Indeed; postinstall scripts should still execute as far as I’m aware, you just won’t see any output from them unless they fail. |
Is there any workaround available (e.g. manually specifying a postinstall in my repo package.json)? I tried v5 and it works but I cannot use it right now because of its license. |
The issue is INIT_CWD not being set anymore: npm/cli#2033 Also this is a duplicate of #776 |
Yes, thanks! Meanwhile, INIT_CWD="$(pwd)" npm install husky --save-dev |
or possibly use require.resolve?
On Sat, Dec 5, 2020 at 2:37 AM typicode ***@***.***> wrote:
The issue is INIT_CWD not being set anymore: npm/cli#2033
<npm/cli#2033>
Yes, thanks! Meanwhile, INIT_CWD could be manually set:
INIT_CWD="$(pwd)" npm install husky --save-dev
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#788 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACKRFIQ73X4MJ2I7ZP5RWDSTILNVANCNFSM4TQXWIVA>
.
--
[image: --]
Shane R. Spencer
[image: https://]about.me/ShaneSpencer
<https://about.me/ShaneSpencer?promo=email_sig>
|
This should be resolved now in npm v7.1.2. I've run some tests locally using |
Awesome :) |
Hi,
I tried Husky with Node v.15.xx.xx and it doesn't execute post install after launch:
while with Node v.14.xx.xx I can install Husky without any problems.
Anyone got this problem?
I'm on Windows.
The text was updated successfully, but these errors were encountered: