40

Suddenly, IntelliJ IDEA is showing the following module view with a strange yellow colour in the background. I don't know how to get my module back, because it is not being shown: enter image description here

Do you know how can I see my project folder back?

Thanks

stack man
  • 2,303
  • 9
  • 34
  • 54
  • 1
    Did you open the wrong intellij file? In "file-based" projects, there is the .ipr, .iml, .iws files. If you open the wrong one I can imagine it looks like that... – vikingsteve Nov 20 '14 at 12:49
  • Could you please tell me how to browse through them? Not sure if I am understanding. Thanks – stack man Nov 20 '14 at 12:59
  • 1
    Okay, look in the folder where you created the project. Does it have an `.idea` folder (directory based), or can you see files ending with .ipr / .iws / .iml (file based) ? If it is the latter case you can incorrectly open the wrong file, I believe. – vikingsteve Nov 20 '14 at 13:09
  • Thanks. It has an .idea folder – stack man Nov 20 '14 at 14:06
  • 1
    Hmm, ok, I dont see what can be wrong. Is it a problem there is no java code in your project? Maybe check the facets - should there be a web facet for example? Sorry, I'm out of ideas :) – vikingsteve Nov 20 '14 at 14:19
  • No worries mate, I'll try it. I'll upvote you if I had just one more reputation point (I only have 14 and I need 15 :-( ) – stack man Nov 20 '14 at 14:20
  • This link is useful. http://stackoverflow.com/questions/5816419/intellij-does-not-show-project-folders – KiranGautam May 09 '17 at 07:42

10 Answers10

57

This is way late, but deleting my .idea folder did the trick.

  1. Close IntelliJ
  2. cd <project-path>
  3. rm -rf .idea
Tyler
  • 1,705
  • 2
  • 18
  • 26
  • 2
    This worked for me in 2022. Invalidated cache and restarted Intellij because of unrelated reasons. SDK became unlinked as a result. Then the module structure became messed up. I deleted the module and tried to re-import from Maven. It just would not import. Finally doing this imported my module again with Maven. Had to manually re-define the SDK. And now looks like I'm back to normal. Intellij is known to cause real headaches from time to time. – Nopiforyou Feb 01 '22 at 22:01
  • This is the last thing you can try, but before that try other options, in my case this https://stackoverflow.com/a/76578090/12715463 solved my issue – Komiljon Aliyev Jun 29 '23 at 04:41
  • I was worried it'd hose IntelliJ even more, but it did the trick and appears to have fixed everything. – ArtOfWarfare Aug 29 '23 at 16:09
29

You can go to File-> Project Structure and then define it as a Source Folder

dev
  • 506
  • 6
  • 16
12

In Intellij, Right click on your parent pom file and click add as maven project

rogger2016
  • 821
  • 3
  • 11
  • 28
4

For Maven Projects that don't show up you can right click your pom.xml and click 'Add as Maven Project'.

2

In my case Modules kept on disappearing and I managed to fix it with these simple steps:

  • In the Project panel, right click to see the context menu
  • Select "Open Module Settings"
  • Select the Module that is not shown in the tree view
  • Select the first tab labeled "Sources"
  • Press the "+ Add Content Root" link
  • Select the root folder where the files for this module are located

Once the folder has been scanned, press the OK button and you will see the Module appear

ouflak
  • 2,458
  • 10
  • 44
  • 49
2

Right click on pom.xml -> Maven -> Reload Project

0

I had a similar issue. Other answers did not solve the problem for me.

I ended up uninstalling IntelliJ, then installing a new copy. When prompted to import previous settings, I selected the option of not to import, then set up IntelliJ from scratch. After re-install/re-setup, I was able to open my project folder and all of the modules showed like before. Some how my IntelliJ got fubared, my guess is that it happened when I updated it last week.

James Oravec
  • 19,579
  • 27
  • 94
  • 160
0

For me, I must've deleted my .iml file somehow. Files with .iml contain configuration for your modules. The problem was that my project module was not being loaded without it. I'm using gradle, syncing my project with gradle regenerated whichever *.iml was necessary to build. Here is a post that provides a succinct explanation. IntelliJ IDE | .iml File lost or deleted Also - I know this issue is probably long gone and out of his head but for whoever may come across this issue, the above was the solution for me.

Gabe Clark
  • 23
  • 5
0

Check if the FACETS panel is blank enter image description here

If it's blank .Then click the "+" button to add one.

For me .I need a android facet. enter image description here

For details.go to this link

Hope this is work for you.

linjiejun
  • 1,468
  • 15
  • 22
-2

I assume you are used to working with Eclipse. Intellij IDEA uses the same idea, but different names.

A Eclipse workspace is equal to IDEA's project.

A Eclipse project is equal to IDEA's module.

mutlei
  • 145
  • 1
  • 8
  • 1
    Thanks, but that is not an answer to my question. – stack man Nov 20 '14 at 12:28
  • 1
    What I mean is, point the IDEA project folder to your Eclipse workspace folder. Then you might need to set-up IDEA modules to compile and build. – mutlei Nov 20 '14 at 12:49
  • I am not using Eclipse, thus I don't have the workspace folder you're referring to. – stack man Nov 20 '14 at 12:58
  • 1
    Could it be that the IDE project folder is pointed to your module folder? – mutlei Nov 20 '14 at 13:01
  • Thanks. Could be; how can I check it out? – stack man Nov 20 '14 at 14:07
  • 1
    I have little experience with Intellij IDEA, but Android Studio is based on that, so I'll talk about that. What I did was removing the project from the IDE and re-insert it into the IDE through the project file. – mutlei Nov 20 '14 at 15:03
  • Thanks man, I think is a problem with the module, I will get rid of everything and config it again. – stack man Nov 20 '14 at 15:35