title: Getting Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'
body: <p>I am writing an import statement <code>import { PI } from './math/circle'</code> in <em>app.ts</em> file and have a constant <code>export const PI = 3.14</code> in <em>circle.ts</em> file but on running the program by doing <code>tsc app.ts --outFile app.js</code> keeps showing this error.</p>
  
  <blockquote>
    <p>error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'.
    1 export const PI = 3.14  </p>
  </blockquote>
  
  <p>But according to the <a href="https://www.typescriptlang.org/docs/handbook/modules.html" rel="noreferrer">docs</a> I am importing correctly. I have also tried changing the <strong>"module": "commonjs"</strong> to <strong>"module": "amd"/"system"</strong> and then reloading the VSCode windows but no luck. Where am I going wrong?</p>
  
  <p><em>tsconfig.json</em></p>
  
  <pre><code>{
    "compilerOptions": {    
      "target": "es5",                         
      "module": "amd",                    
      "strict": true,                          
      "noImplicitAny": true,                
      "strictNullChecks": true,              
      "strictPropertyInitialization": false
    },
    "exclude": [
      "node_modules"
    ]
  }
  </code></pre>
  
  <p><strong>P.S: typescript version 3.5.3</strong></p>