In 2018.1.1 version, Problem with Error : cannot start process, the working directory '...\.idea\modules' does not exist.
Answered

Recently, My IntelliJ IDEA app has been updated to version 2018.1.1.
But, I can't run Test class.

When run the test class, the following error message is displayed.
This error has occurred since the version was updated.
- Error running '[classname]'
- Cannot start process, the working directory '[project root directory]\.idea\modules' does not exist.


So I checked the folder and it was not created.
The folder was created in a previously imported project.
It is a problem that the project is imported only after the update.
I think it's the bug in new version, how do I request bug fixes?
I don't know what to do if I ask to fix this bug because this is the first time I have posted to the community.
Please sign in to leave a comment.
I'm having the same issue. I need to revert to the older version until a workaround or fix posted.
Hello,
Sorry for the issue. We will fix the problem with the incorrectly set working directory it in next IDE update.
As a workaround please manually change the value from $MODULE_DIR$ to %MODULE_WORKING_DIR% for 'Working Directory' in Run/Debug configuration.
To change it for all new projects please update Default Run/Debug Configuration.
Thank you.
This issue has not been solved yet. So, I want to share my own solution.
To import project, following below..
Project format default setting is .idea, but change to .ipr.
If has this problem, I hope this solution helps.
The project format (file based) solution works. Thank you.
I tried changing the %MODULE_WORKING_DIR% in version idea-IU-181.4445.78 but that did not work.
I'm having the same problem. Thank you for the tip of choosing .ipr project format, it works!
Changing the %MODULE_WORKING_DIR% didn't work for me either.
Issue should be fully fixed in 2018.2. Sorry for the inconvenience.
Do you have a slated release date for this? I would think you would want to push out an urgent hot fix for 2018.1 in order to fix this for people who can no longer run their tests in the IDE. We shouldn't have to change the project format to fix it
I'll try 2018.2 EAP version
Fix also should be included in 2018.1.4. Please comment is the issue still occurs in 2018.1.4 or 2018.2 version
I have 2018.1.3 (on Mac) and clicked Check For Updates and it said I have the latest version. It IS working in the 2018.2 EAP version so I guess I'll use that one for a while.
Seems you check only for stable releases. 2018.1.4 is in EAP state also: https://confluence.jetbrains.com/display/IDEADEV/IDEA+2018.1+EAP
Oh thank you. I'll check that setting.
BTW, this is probably the first time I've hit a blocking bug in Intellij in the many many years of using it. I don't know what I would do if I couldn't use Intellij anymore :)
Keep up the great work!
Thanks for your kind words!
Thank you for a kick-ass IDE (and making it so I never have to use Eclipse again! lol)
I have version
And it's still happening for me:
Do you use Maven/Gradle? Can you attach a screenshot of your Run/Debug Configuration, or the project configuration files?
Try if it helps to re-create the configuration.
Btw in 2018.1.4 version in a Gradle-based project (when .iml files are stored in .idea directory) $MODULE_DIR$ macro can also be used, see https://blog.jetbrains.com/idea/2018/05/intellij-idea-2018-1-4-is-released:
>In order to avoid test failures in such cases, we now point the $MODULE_DIR$ variable to the module’s content root in case the .iml file is located in the .idea directory.
I have 2018.1.5 Mac (latest)
I still have this error if trying to run a test class which is also present in an unloaded module in the same project.
If trying to run the folder instead of the single test file, the error changes to: "No junit.jar"
The workaround is to avoid the name conflict or just keep both modules loaded
Actually, it's happening again so it seems to be random but always for the same test case (which is similar to the others)
>I still have this error if trying to run a test class which is also present in an unloaded module in the same project.
What do you mean by also present. Do you mean there is a class with exactly same name?
Yes, however I have doubts that's the reason and I believe it's because I copied the class on the filesystem and then synchronized.
After I removed the modules and add then again it doesn't happen any more.
same issue on 2018.2
have imported my hybris project from git. that used to work in 2017.
i guess will switch to 2017 for now. (before I had issue with search. now seems works, so I switched to 2018.2, but this will push me back to 2017 again).
the way I reproduce is to try to run the unit test from IDE. No luck. Blocker.
I'm using Pycharm 2018.3 Professional and the issue still persists.
Please file a bug at https://youtrack.jetbrains.com/issues/PY and attach a sample project to reproduce.
hi! Android studio related to "activity_main.I get an error like this in the XML" directory. Does it cause problems for my projects? Or is there anyone else who can help you with the solution?

Please report Android Studio issues at https://developer.android.com/studio/report-bugs.html. Use https://stackoverflow.com/ to get help.