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 and git init before CRA in an existing folder can lead to this failure via conflicts.
I agree we should be resilient to git init.
But if you already have a package.json there I don鈥檛 think it鈥檚 okay to rewrite it. If you鈥檙e okay with adding a flag, I don鈥檛 see why adding a rm command before the call would be problematic.
I believe we already are resilient to git init; just not package.json.
If you鈥檙e okay with adding a flag, I don鈥檛 see why adding a rm command before the call would be problematic.
Mainly because the message before failure gives no clue about the conflicts.
"contains files that could conflict" is not helpful.
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鈥檛 quite make sense to me:
npm install create-react-app
npx create-react-app .
Why are you installing it locally?
Just
mkdir myapp
cd myapp
npx create-react-app .
should work fine.
Or, easier,
npx create-react-app my-app
"contains files that could conflict" is not helpful.
I agree we should include a list of these files in the message. I鈥檓 filing an issue for this.
I am setting up my react app via non create-react-app methods
I decide other methods are not working for so I pick up create-react-app
create-react-app now throws an error "contains files that could conflict" and fails
how do I proceed?
Do it in a different folder, or clean the existing folder. I don鈥檛 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鈥檒l close this but filed https://github.com/facebookincubator/create-react-app/issues/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 :/
Most helpful comment
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 :/