node.js - Puppeteer 在 Node 10 运行时中无法使用谷歌云功能
问题描述
我正在尝试以无头模式启动 google chrome 实例,但出现以下错误:
Failed to launch the browser process!
/workspace/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
我正在使用 puppeteer v3.0.0 和 nodejs 10 运行时。我该如何解决这个错误?
解决方案
由于该帖子是关于云功能的,因此在部署该功能时,上述内容将不起作用。此问题是一个已知问题。
有一些关于恢复到 Puppeteer 2.1.0 的讨论, github puppeteer issues 5674
或者
有一个解决方法: github puppeteer issues 5704
我的经验:
- 我尝试了解决方法,但没有奏效。也许它需要调整,但我没有时间调试。
- 我恢复到 puppeteer 2.1.0,部署了 --memory 2048MB 的功能,并且成功运行。
推荐阅读
- python - 为什么在python中更新字典时
- python - nginx:[警告] 0.0.0.0:80 上的服务器名称“域”冲突,忽略
- javascript - 响应式数据表导致奇怪的选择框错误
- c# - 在 C# 中用构造函数赋值和用属性赋值有什么区别?
- python - Jython - 无法安装“ensurepip”
- pandas - 我们如何使用 XLSXWriter 中的 conditional_format() 函数根据多个条件突出显示单个单元格?
- android - 三星 Galaxy S8+ 的触觉(振动)反馈
- go-templates - 用 Go 模板语言在列表中查找对象
- python - python如何确定合适的元类?
- android - 当我写一个 Flutter 插件时,如何获取 android.app.Application 对象?