Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit Issue: "No such file or directory 2: ./node_modules/pre-commit/hook" #13221

Closed
mgg143 opened this issue Oct 31, 2021 · 2 comments
Closed

Comments

@mgg143
Copy link

mgg143 commented Oct 31, 2021

Describe the bug

When I try to commit a file using GitHub Desktop, I end up with this error:
"
: No such file or directory 2: ./node_modules/pre-commit/hook
: integer expression expected: [: 127
: numeric argument required 5: exit: 0

"

I'm hoping to make a multi-line commit message, and GitHub Desktop definitely seems like it would help with that.

Version & OS

Version 2.9.4 (x64)
Windows 10 [Fully updated]

Steps to reproduce the behavior

Click on "Commit" with the file I want to commit selected. The error message then populates.

Expected behavior

Write a clear and concise description of what you expected to happen.

I would love to have my local change committed to my GitHub repository with a descriptive comment, but instead I am getting the error message previously described. This is very frustrating as it prevents me from contributing to my project.

Actual behavior

GitHub Desktop tries to make the commit and then populates the error message.

Screenshots

GitHubDesktopError

Logs

Attach your logs by opening the Help menu and selecting Show Logs..., if applicable.
2021-10-31.desktop.production.log

Additional context

Add any other context about the problem here

@FMA606
Copy link

FMA606 commented Dec 15, 2021

@steveward
Copy link
Member

@mgg143 apologies for not getting a response back to you. If you are still running into this issue I would recommend following the solution mentioned here and here by making this change:

npm -> npm.cmd
npx -> npx.cmd

Let us know if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants