title: In Angular application, I keep getting this error Cannot find module 'fs'
body: <p>In my service file, I import these four libraries: </p>
  
  <pre><code>import * as async from "async";
  import * as officegen from "officegen";
  import * as path from "path";
  import * as fs from "fs";
  </code></pre>
  
  <p>While there's no problem with async,officegen and path. The fs line keeps giving this error:  </p>
  
  <blockquote>
    <p>ERROR in src/app/matieres/matiere.service.ts(11,45): error TS2307:
    Cannot find module 'fs'.  </p>
  </blockquote>
  
  <p>In hopeless attempts, I tried these:    </p>
  
  <blockquote>
    <p>npm install fs -g</p>
    
    <p>npm install fs --save</p>
    
    <p>npm install file-system -g</p>
    
    <p>npm install file-system --save</p>
  </blockquote>
  
  <p>None of which worked 
  This is really confusing.
  Anyone can help?  </p>