Closed FaberVitale closed 3 years ago
Damn. Can you submit a PR to pin Husky to v4 versions that works? Since v5 is not open source yet
Thanks for bringing this to attention @FaberVitale and providing some details and links to the upstream issue.
Downgrade husky
Can you submit a PR to pin Husky to v4 versions that works?
So I was going to say that downgrading and hard pinning does not actually resolve the root cause issue here and is generally not recommended for an upstream issue -- the upstream issue may itself be resolved without requiring churn from downstream and downstream of downstream consumers. Notably, this would require no less than two releases, one to hard pin, and one to remove the hard pin. I would encourage contributing upstream when possible, #511 and upstream https://github.com/lukeed/sade/pull/36 is an example of this.
That is particularly true for the templates; TSDX does not control them when they are out in the wild (and so cannot later, say, upgrade the version) and actually doesn't version the deps in the templates. A hard pin can also be very confusing to users as it is inconsistent with other dependencies.
It so happens that Husky reverted this change very quickly: v4.3.5 should no longer error and so no action is required from TSDX.
fatal: not a git repository (or any of the parent directories): .git
This is the root cause, and the solution to that is actually to implement #755, which I was going to recommend if Husky did not revert. It should probably still be done to avoid such a problem in the future, although inclusion of Husky v5+ is up for debate given that it can't be used by all libraries due to license limitations
https://github.com/typicode/husky/issues/822#issuecomment-739586804 succinctly describes that v4.3.4 simply made a silent error much louder by actually throwing (in order to resolve another issue). One of the challenges of maintaining is that a bugfix like that can sometimes also be breaking and so puts one into a precarious position. In this case, it seemed to cause more (unexpected) issues than it solved, which is likely what led to it being reverted.
Current Behavior
Fails at install dependencies phase.
The error is likely caused by the latest version of husky@4.3.4
See also: https://github.com/typicode/husky/issues/822
Expected behavior
tsdx create
command should install all dependencies and create a lock file.Suggested solution(s)
Downgrade husky or pass HUSKY_SKIP_INSTALL=true.
Your environment