1

我正在尝试在下一个用于 SSR 的 js 项目中使用 Puppeteer。我需要解析html字符串并修改它。

尝试导入 puppeteer 时出现此错误:

“原始”参数必须是函数类型

节点版本:14

我尝试过其他解析库,如 jsdom(由于 ShareArrayBuffer 问题而无法工作),正在寻找 puppeteer 的解决方案。

Uncaught TypeError: The "original" argument must be of type Function
    at promisify (util.js?3022:614)
    at eval (index.js?6b55:11)
    at Object../node_modules/extract-zip/index.js (index.js?ts=1630396319822:1981)
    at Object.options.factory (webpack.js?ts=1630396319822:675)
    at __webpack_require__ (webpack.js?ts=1630396319822:37)
    at fn (webpack.js?ts=1630396319822:353)
    at eval (BrowserFetcher.js?aafb:48)
4

0 回答 0