Unable to use "FS" module of nodejs

I am developing an APP in Angular 8.0. I have made a service in which I want to write a data to file using nodejs. But it seems that nodejs's fs module does not work. It does not write data to a file. I also visited below url to use nodejs core module.

So please help me

Hi @mitesh.kadiya, Welcome to the forum.
What is the version of your webOS OSE? + What is your target device?

Hello @mitesh.kadiya,

Could you provide the following information?

  • The directory where the file you're trying to write to is located
  • Error message of the operation

Thank you.

Now some reference implementations of node.js services are using FS module in webOS. You refer them such as com.example.service.iotivity.server, com.example.service.iotivity.client. If your problem still has some issues, please let me know again. I think that actual codes which you are using may be helpful for us to analyze the solutions of some issues.

I have developed an app in Angular 8.0 version. So I want to store image in asset folder which is located in my angular project.

Actuall I am printing error so it gives me "null" as a response