安装husky报错 fatal: not a git repository (or any of the parent directories): .git c

2,260 阅读1分钟

安装husky报错:

安装husky报错:
在这里插入图片描述
fatal: not a git repository (or any of the parent directories): .git
can’t create hook, .husky directory doesn’t exist (try running husky install)

解决方案:

git init

npx husky-init

安装完成后在项目目录下新增了.husky文件夹。