Husky install: .git can't be found
See original GitHub issueEnvironment: WSL Ubuntu, bash terminal Yarn workspaces + lerna monorepo
I’ve migrated from v4 to v6 as per instruction (https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v6). The .git directory, package.json file and the .husky all live at the same level (INB4: https://typicode.github.io/husky/#/?id=custom-directory).
Command husky install (@package.json, scripts.prepare) fails with “Error: .git can’t be found (see https://typicode.github.io/husky/#/?id=custom-directory)” message. I can assure you the .git dir is there and I have all the required permissions
The line that fails:
if (!fs.existsSync('.git')) {
throw new Error(`.git can't be found (see ${url})`);
}
Thank you!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
'husky install' fails if '.git' directory does not exists #851 - GitHub
I have a postinstall script in a NPM package: "postinstall": "is-ci || husky install", If I download the repository using Github UI (Code ......
Read more >How to fix error 'not found husky-run' when committing new ...
I got this after running yarn install inside a unix-based Docker container and then committing on Windows. Windows was unable to run the...
Read more >Husky - Git hooks
Modern native Git hooks made easy. ... Install. Install husky. npm install husky --save-dev. Enable Git hooks. npx husky install ... Command not...
Read more >husky-init - npm
Install and setup husky quickly. Latest version: 8.0.0, last published: 8 months ago. Start using husky-init in your project by running `npm ...
Read more >Get Started with Git Hooks and Husky - DEV Community
Install Git Hooks ... These are the most common hooks available,as you can see they all have a .sample extension, what this those...
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 Free
Top 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
Please follow the link below. https://typicode.github.io/husky/#/?id=custom-directory
@czescwojtek, thanks for the reply. I didn’t manage to solve my issue, but still your information you provided is helpful for me.