Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to create a new module (module already exists) Intellij

I am trying to create a new module in my project. As soon as I specify the name of the module, Intellij throws "That this module already exists". After I exit the wizard it creates a directory with same module name but doesn't make it a module. I delete the directory and I perform "Invalidate Caches and Restart" but still the error persists.

module screenshot

enter image description here

like image 742
Abhishek Dasgupta Avatar asked May 29 '20 06:05

Abhishek Dasgupta


People also ask

How do I add an existing module to IntelliJ?

Import an existing moduleFrom the main menu, select File | New | Module from Existing Sources. In the dialog that opens, specify the path the . iml file of the module that you want to import, and click Open. By doing so, you are attaching another module to the project without physically moving any files.

What is .IML file in IntelliJ?

An IML file is a module settings file created by IntelliJ IDEA, an Integrated Development Environment (IDE) used to develop Java applications. It stores information about a development module, which is a Java, Plugin, Android, or Maven component of a Java application.


1 Answers

I had this issue and went to .idea/modules.xml, found the path with the name I wanted, and deleted that line (just did ctrl+f with the name). After deleting that line and saving the file, I was able to create the module with that name.

like image 130
ansgup Avatar answered Sep 20 '22 08:09

ansgup