title: AWS CDK -- Cannot find module '@aws-cdk/aws-ec2'
body: <p>I just started playing around with AWS CDK yesterday and I found something very weird.</p>
  <p>First of all, I'm using TypeScript for my CDK app (I used <code>cdk init --language typescript</code> to generate the project files and I tried to import aws-ec2 module so this is what I did:</p>
  <pre class="lang-ts prettyprint-override"><code>import cdk = require('@aws-cdk/core');
  import ec2 = require('@aws-cdk/aws-ec2');
  
  export class vpcStack extends cdk.Stack {
    constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
  
  //.... all other codes go here....
  </code></pre>
  <p>However, when importing the aws-ec2 module this way, I got this error when trying to deploy the stack:</p>
  <pre><code>⨯ Unable to compile TypeScript:
  lib/cdk-type_script-stack.ts:2:22 - error TS2307: Cannot find module '@aws-cdk/aws-ec2'.
  
  2 import ec2 = require('@aws-cdk/aws-ec2');
                         ~~~~~~~~~~~~~~~~~~
  
  Subprocess exited with error 1
  </code></pre>
  <p>This is very weird because the <a href="https://docs.aws.amazon.com/cdk/api/latest/docs/aws-ec2-readme.html" rel="nofollow noreferrer">API docs right here</a> clearly stated that this is how I should import the aws-ec2 module in TypeScript</p>