all files in my project became non-project

It already happened six months ago. I had to delete the entire project and reinstall it

0

Please share screenshots of Settings | Directories and Settings | Languages & Frameworks | JavaScript | Libraries pages

0

Your `.idea` files are broken, either the` .iml` file or `modules.xml` are corrupted

2

Я удалял .idea папку, потом делал invalidate cashes с перезагрузкой ide. Так что думаю дело не в этом

1

т.е. даже после удаления папки проблема не лечится? Очень странно - у вас нет ни одного контентного рута в проекте, если судить по скриншотам, это может быть только проблемой с пакой `.idea`

пришлите, пожалуйста, эту папку + idea.log (Help > Show Log in ...). Разместите их на каком-нибудь файловом сервере и пришлите ссылку

0

Да, после удаления ничего не поменялось.

https://disk.yandex.by/d/R4EXsJhe8YBFwg?w=1

0

Похоже это какая-то проблема с github потому что я не могу запушить коммит, просит залогиниться, я логинюсь падает ошибка что репозиторий не найден, хотя он есть и потом опять просит залогиниться

0

у вас в .idea отсутствуют файлы ` .iml` и `modules.xml`. WebStorm их обязательно создает при создании проекта и никогда не удаляет. По какой-то причине эти файлы у вас удаляются. Может, у вас есть какие-то утилиты, синхронизирующие содержимое диска и удаляющие "лишнее"? Или, может, файлы удаляются при апдейте проекта из репозитория?

0

I have the same problem. Can you continue the discussion in English?

0

I had to delete the project and clone it again from git to fix the problem :(

2

It's really unfortunate if that's the only solution. We shouldn't have to do that.

0

Same problem here. Deleting AppData/Local and AppData/Roaming dirs worked for me, beware though, all pycharm settings are going to be wiped.

0

The same issue, but i'm using windows 10 and my source code is located under wsl2 folder: \\wsl$\Ubuntu-20.04\...

And yes, the .idea had only 

anton@SweetHome:~/wrk/******/.idea$ ll
total 20
drwxr-xr-x 2 anton anton 4096 Sep 16 01:26 ./
drwxr-xr-x 6 anton anton 4096 Sep 15 01:17 ../
-rw-r--r-- 1 anton anton 185 Sep 15 10:49 vcs.xml
-rw-r--r-- 1 anton anton 4547 Sep 16 01:26 workspace.xml

After removing the .idea folder of a project and restart WS the issue is gone, have no idea what was wrong, will monitor this.

0

Hey, just restarting the laptop worked :D 

0

I had the same problem. Deleting .idea folder and open the project again worked for me.

2

Close the project, Close webstorm. In the file explorer, delete the .idea folder. Open web storm again and open the project folder. 

This worked for me.

13

I resolved this problem. For me it was in folder .idea. I just added to idea folder this file - modules.xml

1

Developer2's is spot on.

The modules.xml file is missing from the .idea/ directory. If you add this modules.xml file to your .idea directory, replacing project.iml with the name of the .iml file in the .idea directory and then restart PHPStorm you will be good to go.

 

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

1

Jake Spencer and Developer2 Helped me get fixed. I had to restore/create both the modules.xml and the project.iml files as somehow they were both gone.

0

Close the project in RubyMine

`rm -rf ./idea`

`git add --all`

`git commit -m "remove rubymine configs"`

Then I opened the project, it started indexing from the beginning. Took time, but it worked for me. Remember the commit again when IntelliJ creates .idea files

 

1

Selcuktoklucu thanks man. Commit was unnecessary for me, but problem was finally resolved.

0

go to File -> Project structure 

then go to Modules
Press at "+", choose template and add your project as module

i hope its help to all of you

 

1

This happened to me with a python project.
To fix it:

  1. In Settings go to Project/Project Structure
  2. Look to see if there is a content root assigned.
  3. Assign the correct root path for you project.
  4. Continue coding :)

 

1

Thanks Nicholas Straw, you saved my python project!

0

I know this might not be the place for WebStorm comment, but maybe someone finds it useful. WebStorm → Preferences → Directories → Add the content root. Much easier that deleting the .idea folder that already has all your settings and restarting the whole WebStorm.

0

I was just having this issue and was able to fix it by going to File --> Repair IDE and going through the first three steps (including restarting the IDE).

0

Thanks Nicholas Straw, you saved me!!!!!!!!!!!!!!!!!!

0

Using IntelliJ, Project Settings > Modules > Adding repo path resolved my issues with this (can reaffirm and attest to Pafilippov's answer)

0

After run "git clear", I get the same error.   I read all the comment in this artcle. i guess the .idea file is broken, so I close the IDE, and go to the project path, remove the .idea, and open the project again, it's ok.

0

Solution for me:

1. Remove an .idea folder
2. Close PyCharm project and remove your project from Recents
3. Restart PyCharm and then Open your sources (as a new project for PyCharm)

Done 

0

请先登录再写评论。