TypeError: fs.readFile is not a function

cause

  1. Spelling mistakes, pay attention to capitalization.
  2. This thing is to run under node. I wrote it in the react component and used it as a method, and then kept reporting various errors. In fact, it should be a js file, and then run this file with the node command. Vegetable cry...
    insert image description here
    insert image description here

Guess you like

Origin blog.csdn.net/Charonmomo/article/details/129558148