nconf icon indicating copy to clipboard operation
nconf copied to clipboard

config json file is empty (all data is wiped out)

Open alishefaee opened this issue 3 years ago • 4 comments

I used config json file to save my config. but I rarely sometimes encountered an empty file and I didn't know why. Until recently this happend when electricity was gone ( or computer is unplugged ). The config.json file exists but is empty.

"nconf": "^0.12.0"

OS: Window 10

alishefaee avatar Dec 29 '22 10:12 alishefaee

Hi alishefaee! I know it was a long time ago, but you discovered how to solve this problem?

It is happening to me too and we are using the lib to critical config files.

mfpereira avatar Jul 16 '24 14:07 mfpereira

@mfpereira No, I didn't

alishefaee avatar Jul 16 '24 14:07 alishefaee

This is an old issue and still does not work with example. I think that it is due to memory and format parameters in save function implementation. Just use save without callback function config.save(); will still work.

tinwinaung avatar Sep 22 '24 11:09 tinwinaung