title: tsc throws error TS2307: Cannot find module for a local installed module
body: <p>I've read these similar questions:</p>
  
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/37548734/tsc-throws-ts2307-cannot-find-module-for-a-local-file">tsc throws `TS2307: Cannot find module` for a local file</a> - my problem is different because I'm <em>installing</em> a local package, not just referencing a local file.</p></li>
  <li><p><a href="https://stackoverflow.com/questions/42481149/error-ts2307-cannot-find-module-external-private-module">error TS2307: Cannot find module (external, private module)</a> - my problem might be similar to this one (there's not enough detail for me to tell for sure).  But turning on <code>noResolve</code> causes other problems (and seems like a hack since I'm seeing a difference in behavior between macOS/Linux/Windows)</p></li>
  </ul>
  
  <p>In my Typescript project, I have two directories:</p>
  
  <pre><code>core/
    package.json
    ...
  app/
    package.json
    ...
  </code></pre>
  
  <p>Within <code>app/</code> I have installed the <code>core/</code> module using <code>yarn</code> like this:</p>
  
  <pre><code>yarn add file:../core
  </code></pre>
  
  <p>which shows up in <code>app/package.json</code> as:</p>
  
  <pre><code>{
    ...
    "dependencies": {
      ...
      "my-core": "file:../core",
      ...
    }
  }
  </code></pre>
  
  <p>On macOS and Linux, running <code>tsc</code> from within <code>app/</code> works fine.  But when I run <code>tsc</code> on Windows, I get this:</p>
  
  <pre><code>C:\proj\app&gt;cmd /c yarn compile 
  yarn compile v0.27.5
  $ cross-env NODE_ENV=production tsc
  src/thing/appstate.ts(4,29): error TS2307: Cannot find module 'my-core'.
  error Command failed with exit code 2.
  </code></pre>
  
  <p>Here's my <code>app/tsconfig.json</code>:</p>
  
  <pre><code>{
    "compilerOptions": {
      "target": "es2017",
      "module": "umd",
      "moduleResolution": "node",
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "removeComments": true,
      "noImplicitAny": false,
      "noImplicitThis": false,
      "noUnusedLocals": true,
      "noUnusedParameters": false,
      "sourceMap": true,
      "jsx": "react",
      "listEmittedFiles": false,
      "lib": ["es2017", "dom"]
    },
    "include": [
      "src/**/*.ts",
      "src/**/*.tsx"
    ],
    "exclude": [
      "node_modules"
    ]
  }
  </code></pre>
  
  <p>Is this a yarn bug? Or a Typescript bug?  Or am I doing something wrong? :)</p>