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