0

I tried this method :

var fs = require("fs");
//or try
//var fs = require("file-system");
var cont = " selamm \n";
fs.writeFileSync("read2.txt", cont, { flag: 'a' },
    err => {

    });

Not working for Angular JS project. System err : "fs is not a function". System err "fs.existsSync is not a function" if I try "file system" library.

What alternatives can I use? Help?

  • This question may lead you into the right direction. https://stackoverflow.com/questions/27019242/node-js-fs-module-inside-browser; I do not think a web browser can us node fs module. – joshvito Jun 22 '22 at 13:36
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 22 '22 at 19:35

0 Answers0