title: Angular - Module not found (fs)
body: <p>I am trying to use Node's fs module in my Angular app.</p>
  
  <p>I assume that my problem lies in that Angular does not run in a node environment. Is it possible to run an Angular app in a node environment (or give it access to the file system in an other way) or should I create a separate Node server that can take care of this type of operations?</p>
  
  <p>My code:</p>
  
  <pre><code>import { Injectable } from "@angular/core";
  import * as fs from "fs";
  
  @Injectable({
    providedIn: "root"
  })
  export class FileSystemService {
    constructor() {}
  
    schrijfNaarBestand(json: any) {
      const writeableStream = fs.createWriteStream(
        "../data/verrichte-metingen/test.json"
      );
      writeableStream.write(json, "UTF8");
      writeableStream.end();
    }
  }
  </code></pre>