Erroneous Module-not-Read Reports

Answered

 This behavior only started a few IntelliJ releases back.

IntelliJ is incorrectly telling me that it cannot find modules. I have MANY of errors for many packages and classes, which results in almost the entire scroll bar being filled with red lines. Here is one item to look at specifically.

x.java source file has a red marked class that complains ...

Package 'com.stripe' is declared in module 'com.stripe', but module 'com.unilogical.moxydox.server' does not read it

IntelliJ Red Light Bulb offer this fix ...

Add 'requires com.stripe' directive to module-info.java

But, module-info.java already contains it ...

module com.unilogical.moxydox.server{
requires com.stripe;
}

module-info.java shows "com.stripe" in red and complains ...

Module not found: com.stripe

The application runs fine though, so at runtime the com.stripe.jar is found. It is just not found for the IntelliJ code interrogation.

com.stripe.jar is stored in a project folder, "Mods". The application has a Modules entry of "com.unilogical.moxydox", which specifies a Dependencies entry "Mods and one more file" of Scope "Compile", which list "Classes" and "Sources" of "Mods" directory.

Note that I have dozens of .jars in the "Mods" and only some of them complain. The others work without complaint. The .jars were all created the same way (by me).

Why do some modules give this apparent false report? How can I fix it so I don't have so many errors displayed that I cannot read my code or see the colored line indicators on the scrollbar?

Thank you!

 

0
7 comments

Hello,

Do you face this issue with other projects? Have you tried to run "File | Invalidate Caches"? Is it possible to provide sample project for investigation?

0
Avatar
Permanently deleted user

Yes, it happens on all of my projects.  It happens even after "File | Invalidate Caches".

0

Is it possible to provide sample proejct for investigation?

0
Avatar
Permanently deleted user

I will see if I can create a sample project.

0

Thanks in advance!

0
Avatar
Permanently deleted user

I created an IntelliJ Support Request (#1740259) and added a sample project to it.

 

https://intellij-support.jetbrains.com/hc/requests/1740259

0

Thanks!

0

Please sign in to leave a comment.