1

I'm trying to generate pdf with puppeteer and I'm having an issue when I need to bring the handlebars file along.

In the tutorial the guy was using fs-extra npm package so that is the one I installed,

const html = await fs.readFile(filePath, 'utf-8')

But apprently it's not a function, I went to the npm doc and I haven't found anything similar, is it only used for moving/deleting/copying/... files and dirs now ? I'm a bit lost, do I need to change to another npm package ? or am I missing something ?

Double Bang
  • 184
  • 15

1 Answers1

0

So I wrote this question too early, just read that it's included in Node.js. It should have merged together with the fs-extra package as specified in the doc but it didn't somehow...

Anyway using the classic node fs works for me.

Double Bang
  • 184
  • 15