GitHub Desktop ‘husky’ pre commit Exception

GitHub Desktop issue with pre-commit package and related hooks? Struggled with this one this morning and tried a few things. I thought I would document so it may help others struggling with the same issue.

- April 19, 2020

Rest of the Story:

After adding a solution to my local GIT repository, and comitting to local master I received the following exception…

< p>Commit failed - exit code 1 received, with output: 'husky > pre-commit (node v12.16.2)

[npm run lint] [npm run lint] > vuesion@3.7.2 lint D:_Projects\GitHub\GitHub\Yardy\VueEParent\VueE\VueE\PWA\vuesion-master

[npm run lint] > vuesion lint [npm run lint] [npm run test] [npm run test] > vuesion@3.7.2 test D:_Projects\GitHub\GitHub\Yardy\VueEParent\VueE\VueE\PWA\vuesion-master [npm run test] > vuesion test --coverage [npm run test] [vuesion prettier --staged]   Finding changed files since git revision 5f8e91e. [vuesion prettier --staged]   Found 334 changed files. [npm run test] PASS src/app/shared/components/VueDropdownMenu/VueDropdownMenu.spec.ts [npm run test] PASS src/app/shared/components/VueButton/VueButton.spec.ts [npm run test] PASS src/app/shared/components/VueSlider/VueSlider.spec.ts [npm run test] PASS src/app/shared/components/VueAutocomplete/VueAutocomplete.spec.ts (5.11s) [npm run test] PASS src/app/shared/components/VueStarRating/VueStarRating.spe


Attempts & Solution:

*Tried adding C:\Program Files\Git\bin to PATH – no change (tried a commit and still have the issue) *Tried adding C:\Program Files\nodejs to PATH – no change (tried a commit and still have the issue) *Got it (worked)

npm rebuild removed the node_modules

performed my commit

npm install

All good for now