title: TypeScript, error in tsconfig.json when importing module from self-made package
body: <p>I need to share some functions between Node projects, so I created a private repository in my Github account, then I added it to a new project with:</p>
  
  <pre><code>$ yarn add git+ssh://git@github.com:my_gh/my-api-types.git --dev
  </code></pre>
  
  <p>I can see the code in <strong>node_modules/my-api-types</strong> directory and I can import the code with:</p>
  
  <pre><code>import { AccountResolvers } from "my-api-types";
  </code></pre>
  
  <p>VS Code doesn't send any error message and actually the IDE display properly the methods inside AccountResolvers. But when I want to compile the project I'm getting:</p>
  
  <pre><code>ERROR in /home/manuel/customer-service/tsconfig.json
  [tsl] ERROR
      TS6307: File '/home/manuel/customer-service/node_modules/my-api-types/src/features/account/account.graphql.ts' 
      is not in project file list. Projects must list all files or use an 'include' pattern.
  </code></pre>
  
  <p>The error address to my <strong>tsconfig.json</strong> but I've being using the same file with other projects without problem: </p>
  
  <pre><code>  {
     "compilerOptions": {
      "composite": true,
      "target": "es2016",
       "module": "commonjs",
       "moduleResolution": "node",
       "esModuleInterop": true,
       "outDir": "./dist/",
       "noImplicitAny": true,
       "skipLibCheck": true,
       "jsx": "react",
       "moduleResolution": "node",
       "noFallthroughCasesInSwitch": true,
       "forceConsistentCasingInFileNames": true,
       "noImplicitReturns": true,
       "allowSyntheticDefaultImports": true,
       "strict": true,
       "noUnusedLocals": true
     }
   }
  </code></pre>
  
  <p><strong>UPDATE</strong> </p>
  
  <p>The problem is gone when the option "composite" is set as "false", the help doc says:</p>
  
  <p>Referenced projects must have the new <code>composite</code> setting enabled. This setting is needed to ensure TypeScript can quickly determine where to find the outputs of the referenced project. Enabling the <code>composite</code> flag changes a few things:</p>
  
  <ul>
  <li>The <code>rootDir</code> setting, if not explicitly set, defaults to the directory containing the<code>tsconfig</code> file</li>
  <li>All implementation files must be matched by an <code>include</code> pattern or listed in the <code>files</code> array. If this constraint is violated, <code>tsc</code> will inform you which files weren’t specified</li>
  <li><code>declaration</code> must be turned on</li>
  </ul>