title: Cannot find module `@ericblade/quagga2`
body: <p>I'm having an issue with my typescript serverless CDK lambda dependencies. Simply running npm install and routing to the file where I'm importing the @ericblade/quagga2 module, I can command click and route to the module.</p>
  <p>However, when running the command <code>sam local invoke --event s3-event.json</code> I get an error that the module could not be found. ( other modules like aws-sdk were found )</p>
  <p>I'm thinking this is a typescript problem, but I'm not sure how to fix it. I'm unfamiliar with any custom d.ts file hack that would solve this problem.</p>
  <p>import statement : <code>const Quagga = require('@ericblade/quagga2').default</code></p>
  <p>tsconfig.json:</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;target&quot;: &quot;ES2018&quot;,
      &quot;module&quot;: &quot;commonjs&quot;,
      &quot;esModuleInterop&quot;: true,
      &quot;lib&quot;: [
        &quot;es2018&quot;,
        &quot;dom&quot;
      ],
      &quot;declaration&quot;: true,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;strict&quot;: true,
      &quot;noImplicitAny&quot;: true,
      &quot;strictNullChecks&quot;: true,
      &quot;noImplicitThis&quot;: true,
      &quot;alwaysStrict&quot;: true,
      &quot;noUnusedLocals&quot;: false,
      &quot;noUnusedParameters&quot;: false,
      &quot;noImplicitReturns&quot;: true,
      &quot;noFallthroughCasesInSwitch&quot;: false,
      &quot;inlineSourceMap&quot;: true,
      &quot;inlineSources&quot;: true,
      &quot;experimentalDecorators&quot;: true,
      &quot;strictPropertyInitialization&quot;: false,
      &quot;typeRoots&quot;: [
        &quot;./node_modules/@types&quot;
      ]
    },
    &quot;exclude&quot;: [
      &quot;cdk.out&quot;
    ]
  }
  </code></pre>
  <p>I've tried messing around with different configurations in the tsconfig, but I'm not really sure what I'm doing.</p>