Skip to content

husky pre-commit failed - cannot find 'pretty-quick' when using cygwin #9278

Closed

Description

@stockhuman

Describe the bug

A bad path(?) prevents me from commiting via github desktop, presumably because of my default shell being set to cygwin. This is a new error despite my shell being set to cygwin for years without issue.

Version & OS

Windows 10 (1909) & GH Desktop 2.3.1

Screenshots

3690b74aae21a850ff3af6f322fd0f71

Logs

the contents of the screenshot, from the logs:

2020-03-14T15:44:04.855Z - error: [ui] `git commit -F -` exited with an unexpected code: 1.
stderr:
husky > pre-commit (node v13.5.0)
/c/Users/<me>/Documents/GitHub/cannon-es/node_modules/.bin/pretty-quick: line 5: cygpath: command not found
internal/modules/cjs/loader.js:969
    throw err;
    ^

Error: Cannot find module 'C:\pretty-quick\bin\pretty-quick.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:17)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
husky > pre-commit hook failed (add --no-verify to bypass)

Activity

  1. sban2009 commented on Mar 3, 2023

    @sban2009

    @stockhuman what was the solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions