-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Initialize git repo before template dependecies are installed #8280
Comments
Hi @lukaszfiszer, good pick-up. Would you be interested in raising a PR for this? |
Fixed in 3.4.0. Closing |
I'm trying to create a template that uses husky. It looks like husky is properly installed after the git repo is initialized, however, the hooks are not properly installed.
In order to fix i have to re-install husky after 'create' finishes. |
@nathanrpage97 Just retested with following commands and it seems to be working fine:
|
@lukaszfiszer Thanks for the response. Would you mind sharing the custom-template you are using? I've experienced this issue with both yarn and npx. For reference, I've published the package on npm under cra-template-typescript-husky. |
Is your proposal related to a problem?
When creating a react app with a template that include a dependency requiring a git repo to work, the installation can fail or be incorrect for the developer that executes create-react-app on their machine. This is because the git repo is initialized after template dependencies are installed.
An example is a very popular package husky which adds git hooks to
.git
directory as part of its postinstall scripts. Those hooks won't be added for the person setting up the app withnpx create-react-app ...
Describe the solution you'd like
init.js function
If you are OK with the proposed solution I'll be happy to prepare PR with the implementation.
The text was updated successfully, but these errors were encountered: