gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Pre-commit hooks fail due to missing dependencies if npm install has not been run

Open aka1976mb opened this issue 1 month ago • 0 comments

When trying to commit changes, the pre-commit hooks may fail with errors like "'prettier' is not recognized as an internal or external command". This happens if npm install hasn't been run recently.

To reproduce:

  1. Make a change to a file.
  2. Stage the file.
  3. Attempt to commit the file.

The pre-commit hooks will fail.

Running npm install resolves the issue by installing the necessary dependencies for the hooks.

We should consider ways to prevent this, such as:

  • Ensuring the pre-commit script checks for dependencies and provides a clearer error message.
  • Adding a check in the development setup documentation to emphasize running npm install.

aka1976mb avatar Dec 06 '25 00:12 aka1976mb