簡體   English   中英

哈士奇安裝導致路徑錯誤

[英]husky install causes patherror

我正在嘗試將 Husky 手動添加到我的項目中,如下所述: https://typicode.github.io/husky/#/?id=manual

我運行npm install husky --save-dev並按應有的方式添加並安裝了 husky 作為開發依賴項。 然后我嘗試運行 npx husky npx husky install並得到以下 output:

C:\Users\Luka\Projects\zeiterfassung\testneu>npx husky install

npm ERR! code ENOENT
npm ERR! syscall spawn bash
npm ERR! path C:\Users\Luka\Projects\zeiterfassung\testneu
npm ERR! errno -4058
npm ERR! enoent spawn bash ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Luka\AppData\Local\npm-cache\_logs\2022-08-21T09_32_56_190Z-debug-0.log

完整的錯誤日志: https://pastebin.com/ypbMCusx

沒有什么能阻止 npm 訪問項目文件夾,所有其他模塊都安裝並正常工作。 我什至在另一台筆記本電腦上嘗試過這個,得到了相同的結果,我做錯了什么?

解決方案是使用Git shell 而不是 cmd。

至於原因,我不確定,我也在管理員模式下嘗試了 cmd 和 PowerShell 但都沒有成功。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM