About the solution to the problem of file corruption caused by forced shutdown and power failure during nodejs fs readFileSync

fs readFileSync In the process of reading files, if the power failure trips, it will be forced to shut down

A file corruption has occurred. . . The file cannot be opened and cannot be read

Tried to increase the options flag

 Useless, still broken

Finally, manually change the file to read-only...

It's also a solution

If you have any questions, you can communicate with each other~~~

 

Guess you like

Origin blog.csdn.net/ljason1993/article/details/124270116