const img = fs.readFileSync("image.jpg") tesseract .recognize(img, config) .then((text) => { console.log("Result:", text) }) .catch((error) => { console.log(error.message) })