549

I have an issue with IntelliJ. It doesn't show any folders in my project view on the left. My setting is "View As: Project" How can I manage it so that the folders and packages are shown again? I don't have any clue because I didn't change any options!

I'm using IntelliJ 10.0.3. I am working on a Maven Lift Project.

9
  • 27
    i know there are solutions already provided. But this is how i got the issue in the first place. I was checking out the git project and before it finishes, opened the project in intellij. So the .idea folder was in a corrupt state and intellij does not refresh it automatically. Either you can delete the .idea folder and open again or try doing a synchronize. hope it helps. Mar 10, 2017 at 2:04
  • 2
    The same thing happened to me after I deleted the .idea folder
    – Jun Yin
    May 11, 2018 at 14:58
  • 5
    IntelliJ Community 2018.1 - Simply deleting the entire .idea folder and then re-opening root folder from the IDE fixed this issue for me. IntelliJ rebuilt and reindexed the entire project.
    – S Walsh
    Jan 24, 2019 at 20:41
  • 3
    I have remove git cloned folder. When I clone back my repository and open in IntelliJ it doesn't show the folders. So, after figure out I found .idea folder is missing modules.xml & terrafuse.iml. So, I copy this two files from .idea folder of another project and restarted the IntelliJ which in turn start working normally.
    – Moh
    Jun 28, 2019 at 15:53
  • 1
    Still a bug in IntelliJ 2021.2
    – Suzana
    Aug 2, 2021 at 10:06

39 Answers 39

1
2
1

If you have a gradle module with the same name as your projects root folder, the gradle import will replace your toplevel module configuration and change your view completely.

Make sure you have no gradle module with the same name as your root directory.

1

I encountered this problem when the .idea folder was accidentally added to SVN version control. When I took an update --- blooey! I subsequently removed the .idea folder from version control.

1

I tried all the solutions above, nothing worked.


Java-Maven project

My problem: In my case i had java-maven project. And the problem was that Idea by default uses it's bundled maven for projects(or anyone you trying to open). I noticed that bundled maven keeps downloading dependencies forever, i.e you never see your sources folder.

Solution: So to configure that, one needs to configure Idea to use maven(mvn) which is installed on the machine for all projects by default. To do that, in the beginning when Idea still did not open any projects...there is a configure button. There chose build tools. Then maven, there you will see dropdown list where you can choose local maven. In short: Configure/Build Tools/Maven/DropdownMenu (My OS: linux branch)

Hope that helps

1
  • In my case it worked (WebStorm) FIle -> Repaire IDE -> Rescan project indexes Mar 22, 2022 at 18:16
1

For me in IntelliJ it was showing me a popup to import the existing project as gradle project. I just clicked ok on it and then the folder structure appeared properly.

1

When importing your project/module be sure to check these two boxes:

enter image description here

1

If you're trying to open a scala/sbt project, the sbt version set in /project/build.properties must match the sbt version installed on your system or intellij won't detect your project's modules properly.

Once that's done, you can just delete the idea folder and restart as the other answers suggest.

1

I have that little while earlier and solved it by following the steps provided below:

  1. Right-click on the External Libraries and select the Load/ Unload modules button

enter image description here

  1. If you see the modules are already loaded, perform the unload/load again as this happens due to a bug in the IntelliJ.

enter image description here

After I have done that, I see the project again at the top of the External Libraries section.

1

I've just solved this problem without having to delete the .idea folder (and thus having to re-configure the workspace), in WebStorm, but I assume it's going to be the same for IntelliJ and other JetBrains IDEs.

First, close your IDE and backup the .idea folder.

In .idea folder there should be .iml file with the name of your project. In my case it's ClientApp.iml. This file defines, which directories belong to the project, which should be excluded etc. Note the name of this file in your .idea folder.

Next, open modules.xml file. It should look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/ClientApp.iml" filepath="$PROJECT_DIR$/.idea/ClientApp.iml" />
    </modules>
  </component>
</project>

Check if fileurl and filepath match name of your .iml file, if not fix the filenames, save and re-open your IDE. For me, this fixed it.

People in other answers are right that this is a problem with Modules. In WebStorm in 2024, there are no modules in Settings, I think it was renamed to Directories. When I added the project root this way, the project got renamed and all folder settings (test, resources, excluded) were lost, so fixing the .xml file seems like a better option.

0
  1. Disable all plugins
  2. Restart IDE
  3. Files and folders should now be visible
  4. Go through your plugins 1 by 1 enabling them to find the culprit
1
2

Not the answer you're looking for? Browse other questions tagged or ask your own question.