Skip to content
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

"We couldn't initialize the sample project because this file already exists: README.md" #3240

Closed
ZahraaHawie opened this issue Oct 4, 2022 · 4 comments
Labels
status:ready This issue is ready to be worked on type:improvement

Comments

@ZahraaHawie
Copy link

I'm working on a react app and I want to connect it to a smart contract. Upon hardhat initialization I got this error:

"We couldn't initialize the sample project because this file already exists: README.md"

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2022

This issue is also being tracked on Linear.

We use Linear to manage our development process, but we keep the conversations on Github.

LINEAR-ID: fc7776f0-7a64-47c5-b37d-b529ff66d20d

@fvictorio
Copy link
Member

Hi @zahraha97, the project initialization doesn't overwrite any files, so that's why you are getting that message. A simple workaround is to rename the README and then delete the one created by Hardhat:

mv README.md README.md.bak
npx hardhat
rm README.md
mv README.md.bak README.md

But I think that, at least for the README, we should just not add one instead of throwing this error.

tmigone added a commit to tmigone/hardhat that referenced this issue Oct 12, 2022
Closes: NomicFoundation#3200, NomicFoundation#3240
Signed-off-by: Tomás Migone <tomasmigone@gmail.com>
@github-actions github-actions bot added the Stale label Nov 5, 2022
@15802841343
Copy link

+1 I got the same problem

@github-actions github-actions bot removed the Stale label Nov 26, 2022
@fvictorio fvictorio added type:improvement status:ready This issue is ready to be worked on labels Dec 25, 2022
@fvictorio fvictorio removed their assignment Dec 27, 2022
@alcuadrado
Copy link
Member

Fixed in #3211

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:ready This issue is ready to be worked on type:improvement
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants