Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 puppeteer 生成 pdf,但当我需要携带车把文件时遇到问题。
在教程中,这个人使用 fs-extra npm 包,所以这是我安装的,
const html = await fs.readFile(filePath, 'utf-8')
但显然它不是一个功能,我去了 npm doc,我没有找到任何类似的东西,它现在只用于移动/删除/复制/...文件和目录吗?我有点迷茫,我需要换成另一个 npm 包吗?还是我错过了什么?
所以我写这个问题太早了,只是读到它包含在 Node.js 中。它应该与文档中指定的 fs-extra 包合并在一起,但它并没有以某种方式......
无论如何,使用经典节点fs对我有用。
fs