-
-
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
Option to overwrite conflicting files while creating new app #2776
Comments
I agree we should be resilient to But if you already have a |
I believe we already are resilient to |
Mainly because the message before failure gives no clue about the conflicts. It is possibly easier to think about this scenario if we consider a use case
|
Relatedly now that npm 5.2 has added npx, I no longer want to have global node modules. So I would like to be able to do the following:
Currently, the above would throw an error as the folder contains
|
This sequence doesn’t quite make sense to me:
Why are you installing it locally? Just
should work fine. Or, easier,
|
I agree we should include a list of these files in the message. I’m filing an issue for this.
Do it in a different folder, or clean the existing folder. I don’t see a problem here. If CRA overwrote your work it could potentially destroy valuable files. You could accidentally run it in a wrong directory. I think the current behavior is correct. |
I’ll close this but filed #2780 for better error message. Thanks for explaining! |
Trying to run this in e.g. Cloud 9, I find that Cloud 9 continuously creates a .c9 folder (working area for the IDE) which reappears as soon as I remove it. Only alternative seems to be creating in a subfolder, then moving everything up a level :/ |
Currently, creation of a new app will fail if the folder has files which will be added by create-react-app.
It would be nice to have an option which allows us to let create-react-app overwrite those conflicting files. Simple initialisations like
npm init
andgit init
before CRA in an existing folder can lead to this failure via conflicts.The text was updated successfully, but these errors were encountered: