Creating React App Fails

I am trying to create a react app in IntelliJ IDEA Ultimate and it fails every time.  I am going to project > New, then selecting Static Web, then React App.  In the next screen, I enter the app name, and leave everything else at the default (node interpreter is /usr/bin/node, create-react-app is path to create-react-app in my user directory, and scripts version is blank, with no options available).  When I create the app, I receive the following error:

The directory . contains files that could conflict:

test-app.iml

Either try using a new directory name, or remove the files listed above.
Done

I have tried this about a dozen times, using various combinations of project folders and modules, and absolutely nothing seems to work.  It seems that IntelliJ is creating the .iml file, which is preventing the create-react-app script from running properly.  Any ideas where I'm going wrong with this?

11 comments
Comment actions Permalink

What IDEA version do you use? I can't recreate the issue in IU-191.7479.19, as, since v.2016.3.2, the project is generated in temporary folder to avoid this issue, and then copied in the targer dir

0
Comment actions Permalink

Thanks for your reply!

I'm using the same version, IU-191.7479.19, on Fedora 30.  This had worked before in various 2018 versions of IntelliJ.  Do you know where the temp folder is created?  I can look to see if that is generated.

I was able to still create the project manually, however, it would be nice to be able to do everything from the UI.

Thanks!

0
Comment actions Permalink

It must be created in your system TMP directory as reported by java (system property java.io.tmpdir).

Note that you can pass a different temp directory path to IDEA by adding -Djava.io.tmpdir=/path/to/tmpdir to Help | Edit Custom VM Options...

0
Comment actions Permalink

Has this been fix?  I am seeing the same issue?

0
Comment actions Permalink

What fix are you talking about? It's not an issue since v.2016.3.2

0
Comment actions Permalink

I just upgraded to to intellij IDEA Ultimate 2019.2.3 and I have the same issue:

C:\dev\tools\nodejs\node.exe

~\AppData\Roaming\npm\node_modules\create-react-app\index.js .

The directory . contains files that could conflict:

hello-world.iml

Either try using a new directory name, or remove the files listed above.
Done

0
Comment actions Permalink

works fine for me; please record a video that shows your steps

0
Comment actions Permalink

Following the instructions in this guide https://www.jetbrains.com/help/idea/react.html exactly.  

0
Comment actions Permalink

a video will still be helpful, as well as your idea.log

0
Comment actions Permalink

Kent, I wasn't able to get this working, and just use create-react-app from the command line, then open the resulting project in IntelliJ.  Seems to be the easiest work around.

0
Comment actions Permalink

Thanks for the response.  Yes.  That is what I end up doing as well.  

0

Please sign in to leave a comment.