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
husky > pre-push (node v12.11.0)
sh: 1: yarn: not found
husky > pre-push hook failed (add --no-verify to bypass)
Whilst the fix for this shouldn't be complicated, there's a design decision needed on the preferred approach. If the preference is to stick with calling npm/yarn scripts, could look at using https://github.com/BendingBender/yarpm, or a combination of https://github.com/elijahmanor/cross-var and $npm_execpath. Alternatively it might be preferable to revert back to blitz test and avoid the issue of having to juggle between the two (I'm not sure what the rationale was in moving away).
The text was updated successfully, but these errors were encountered:
Thanks @lukebennett Reason for the change was lint isn't ran by blitz test and it's not immediately clear to folks what blitz test does. Might end up removing that command at some point.
For now let's change from yarn lint && yarn test to npm lint && npm test. The result is the same an dit works for everyone.
What is the problem?
This change to the husky hooks assumes that yarn is installed: blitz-js/blitz#1104. Yet the docs don't stipulate yarn as a requirement, in fact the Getting Started guide uses npm - https://blitzjs.com/docs/getting-started.
As things stand, if you don't have yarn installed, the pre-push hook will error.
Steps to Reproduce
npm rebuild husky
), attempt to push your branch to a remoteVersions
Other
Whilst the fix for this shouldn't be complicated, there's a design decision needed on the preferred approach. If the preference is to stick with calling npm/yarn scripts, could look at using https://github.com/BendingBender/yarpm, or a combination of https://github.com/elijahmanor/cross-var and
$npm_execpath
. Alternatively it might be preferable to revert back toblitz test
and avoid the issue of having to juggle between the two (I'm not sure what the rationale was in moving away).The text was updated successfully, but these errors were encountered: