title: Fixing TS2688: Cannot find type definition file in node_modules
body: <p>When running tsc, I am getting many <code>TS2688: Cannot find type definition file for 'someLibrary'</code>
  These libraries came from <code>node_modules</code>. I have tried to exclude <code>node_modules</code> and <code>skipLibCheck</code> in tsconfig, but none of them works for me. Any idea why is this happening?</p>
  <p>Here's my tsconfig.json</p>
  <pre><code>{
    &quot;ts-node&quot;: {
      &quot;files&quot;: true,
      &quot;emit&quot;: true,
      &quot;compilerHost&quot;: true
    },
    &quot;compilerOptions&quot;: {
      &quot;experimentalDecorators&quot;: true,
      &quot;emitDecoratorMetadata&quot;: true,
      &quot;target&quot;: &quot;es2016&quot;,
      &quot;sourceMap&quot;: true,
      &quot;typeRoots&quot; : [&quot;./node_modules&quot;,&quot;./node_modules/@types&quot;],
      &quot;jsx&quot;: &quot;react&quot;,
      &quot;allowSyntheticDefaultImports&quot;: true,
      &quot;skipLibCheck&quot;: true,
      &quot;esModuleInterop&quot;: true,
      &quot;strict&quot;: true,
      &quot;forceConsistentCasingInFileNames&quot;: true,
      &quot;module&quot;: &quot;commonJS&quot;,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;resolveJsonModule&quot;: true,
      &quot;isolatedModules&quot;: true,
    },
    &quot;exclude&quot;: [
      &quot;node_modules&quot;
    ]
  }
  
  </code></pre>