Error: spawn git ENOENT in events.js:160
See original GitHub issueversion: 4.0.4
"scripts": {
"precommit": "lint-staged",
},
"lint-staged": {
"gitDir": "./path/to/packagejson/",
"*.js": [
"eslint --fix",
"git add"
]
}
- “
git add
” some files - “
git commit
” produce:
> husky > npm run -s precommit (node v6.10.3)
>
> events.js:160
> throw er; // Unhandled 'error' event
> ^
>
> Error: spawn git ENOENT
> at exports._errnoException (util.js:1018:11)
> at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
> at onErrorNT (internal/child_process.js:367:16)
> at _combinedTickCallback (internal/process/next_tick.js:80:11)
> at process._tickCallback (internal/process/next_tick.js:104:9)
>
> husky > pre-commit hook failed (add --no-verify to bypass)
No other node process on background.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
VS Code Error: spawn git ENOENT - Stack Overflow
I get the error Error: spawn git ENOENT when I try to view git history using https://github.com/DonJayamanne/gitHistoryVSCode on VS Code.
Read more >cmd always show this problems, please help me figure out this ...
events.js:160 throw er; // Unhandled 'error' event ^. Error: spawn cmd ENOENT at exports._errnoException (util.js:1022:11) at Process.ChildProcess.
Read more >Ionic CLI error after 3.6.0 update
[DEBUG] New daemon pid: 39216 events.js:160 throw er; // Unhandled 'error' event ^ Error: spawn C:\Program Files\nodejs\node.exe ENOENT at ...
Read more >Serverless Offline Error – sls offline start | What I Broke
serverles events.js:160 throw er Unhandled 'error' event spawn java ENOENT at exports._errnoException (util.js:1020:11) at Process.
Read more >errno: -4058, code: 'enoent', syscall: 'spawn git', path - You.com
node:events:505 throw er; // Unhandled 'error' event ^ Error: spawn git ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try to use the following config:
See also #141