Intellij deleted all my modules and files after recreating top-level module in nested-module project!
Fortunately my project was pushed to github, so I didn't lose much.
I re-created the top-level module, and all existing files, modules including .git were wiped out!
Here are the steps to recreate:
1. Create a Project called “top-level”, say HTML. Location: /tmp
2. Creation a new Module called “java” as Java module, Location: /tmp/top-level
3. Create a few files in /tmp/top-level. `touch one.txt two.txt three.txt` or whatever.
4. Open Module structure, cmd-; then delete the module “top-level”.
Note the module “java” is still in the project, and no files have been touch including step 3 files.
5. This is where it goes wrong. Attempt to recreate the “top-level” module with New Module, HTML, name “top-level”, location: /tmp/top-level.
6. The Module “java” is deleted from disk. /tmp/top-level/java is gone. /tmp/top-level/one.txt etc. are gone
It's as if an entirely new Project was created, rather than just adding a new Module
Version: UE 2024.1.3
Please sign in to leave a comment.
update: Seems to only happen when creating new HTML modules. I retried with a Java module as the top-level module and it did not delete my existing files.
I have created a bug report for you here: https://youtrack.jetbrains.com/issue/WEB-69743/Creating-an-HTML-module-in-an-existing-folder-deletes-all-previous-files
Feel free to vote for updates.