title: Error: package exists in another module: com.company.feature.apimodule in Intellij
body: <p>I created a small project in Intellij Idea to mimic what I am seeing trying to migrate a large legacy codebase to OPENJDK16.  Here is the directory structure:</p>
  <pre><code>$ tree 
  /cygdrive/c/projects/play
   |--api
   |----api.iml
   |----src
   |------module-info.java (module com.company.feature.apimodule)
   |------com
   |--------company
   |----------feature
   |------------ApiRunnable.java
   |--home
   |----home.iml
   |----src
   |------module-info.java (module com.company.feature.homemodule)
   |------com
   |--------company
   |----------feature
   |------------Runnable1.java
   |--Modules
   |----.idea (Idea stuff in here)
   |----out
   |------production
   |--------api
   |--------home
  
  module com.company.feature.apimodule
  {
      exports com.company.feature;
  }
  
  package com.company.feature;
  public interface ApiRunnable
  {
      public void play(String[] strings);
  }
  
  module com.company.feature.homemodule
  {
      requires com.company.feature.apimodule;       //Error Module not found
  //    requires apimodule;                         //Error Module not found
  //    requires com.company.feature.ApiRunnable;   //Error Module not found
  }
  
  package com.company.feature;
  public class Runnable1 implements ApiRunnable
  {
      @Override
      public void play(String[] strings)
      {
          int count = 1;
          for (String str : strings)
          {
              System.out.println(&quot;String &quot; + count++ + &quot; &quot; + str);
          }
      }
      public static void main(String[] args)
      {
          Runnable1 myRun = new Runnable1();
          myRun.play(args);
      }
  }
  </code></pre>
  <p>Note the directory structure is identical in api and home.  This is intentional as my legacy codebase has this structure.  This small example seems to duplicate the problems I am having and I can't figure out if the structure is the problem.  It did compile and run fine using the unnamed-module.</p>
  <p>Error #1 when doing a rebuild</p>
  <pre><code>C:\Projects\play\home\src\com\company\feature\Runnable1.java
  java: package exists in another module: com.company.feature.apimodule
  </code></pre>
  <p>Does this mean that I can't have identical package trees in api and home?</p>
  <p>Error #2</p>
  <p>The homemodule cannot see the apimodule, I keep getting (Module not found) no matter what I put in the requires line.</p>
  <p>Is this related to Error #1?  If not, how do I fix this without resorting to the unnamed module for everything?</p>