title: Why I got the missing package error even though I imported them in Visual Studio Code
body: <p>I followed/clone this <a href="https://github.com/linnovate/mean" rel="nofollow noreferrer">github repo</a>:</p>
  
  <p>Then I open this project in Visual Studio Code. I got this error:</p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>'This syntax requires an imported helper named '__decorate', but module 'tslib' has no exported member '__decorate'.'
    at: '13,1'
    source: 'ts'</p>
    
    <p>'This syntax requires an imported helper named '__metadata', but module 'tslib' has no exported member '__metadata'.'
    at: '13,1'
    source: 'ts'</p>
    
    <p>'Cannot find name 'OnInit'.'
    at: '27,41'
    source: 'ts'</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/dyUuF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dyUuF.png" alt="enter image description here"></a></p>
  
  <p>This is the source code:</p>
  
  <pre><code>import {
    Component,
    OnInit,
  } from '@angular/core';
  /**
   * We're loading this component asynchronously
   * We are using some magic with es6-promise-loader that will wrap the module with a Promise
   * see https://github.com/gdi2290/es6-promise-loader for more info
   */
  
  console.log('`Detail` component loaded asynchronously');
  
  @Component({
    selector: 'detail',
    template: `
      &lt;h1&gt;Hello from Detail&lt;/h1&gt;
      &lt;span&gt;
        &lt;a [routerLink]=" ['./child-detail'] "&gt;
          Child Detail
        &lt;/a&gt;
      &lt;/span&gt;
      &lt;router-outlet&gt;&lt;/router-outlet&gt;
    `,
  })
  export class DetailComponent implements OnInit {
  
    public ngOnInit() {
      console.log('hello `Detail` component');
    }
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/GE1qH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GE1qH.png" alt="enter image description here"></a></p>
  
  <p>P.S. I have reopened Visual Studio Code, but the error is still there.</p>