-
-
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 3.0.3 not working with yarn pnp
[Mac]
#560
Comments
Yarn v1 seems to have some problems with running PnP binaries which are unplugged (which Husky has to be because of how it uses the postinstall hook to copies itself into I would recommend to use Yarn v2 if you're already looking to use PnP, as its implementation is generally more mature there (although the v2 is still technically in developer preview). Here's an example of what it would look like (note that
|
I've published a new version, which is a very early You can give it a try using Feedback is welcome. |
Hey @typicode , $ yarn add husky@next --dev
[...]
success Saved 1 new dependency.
info Direct dependencies
└─ husky@4.0.0-beta.0
info All dependencies
└─ husky@4.0.0-beta.0
✨ Done in 10.10s.
$ HUSKY_USE_YARN=1 git add -A && git commit --amend
yarn install v1.17.3
error `install` has been replaced with `add` to add new dependencies. Run "yarn add husky-run pre-commit " instead.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. |
Will be fixed by #562 🙂 |
Can confirm @arcanis
Seems to fix the running issue, but the hooks themselves are not executing, i'll have a look into why now |
#562 was merged and husky |
This issue isn't fixed for me on I removed all the hooks, reinstalled the newest version and it's still giving me a I'm on yarn |
I get this error when I rm the node_modules and yarn install again. It is also ignored by --no-verify, which leaves the user without the ability to commit at all. yarn 1.21.1 |
In case this helps anyone, I was running into this issue and was able to work around it. Solved via:
Used #560 (comment) to help me debug.
|
@virtuoushub Thanks for your hint, works for me. |
Could be related to: #553
Am using yarn PnP and tried to follow @arcanis' PR #511 to use
yarn husky-run
/HUSKY_USE_YARN=1
Can't tell if there's something wrong in my implementation:
(doesn't seem to matter what's in the
.huskyrc.js
file)The text was updated successfully, but these errors were encountered: