按照leancloud文档配置线上部署后运行报错如下
[2024-10-22T09:53:31.277196300Z][instance:test1] Node app is running on port: 3000
[2024-10-22T09:53:31.344000000Z][system] 实例启动成功:{"runtime":"nodejs-v18.20.4","version":"3.8.0"}
[2024-10-22T09:53:31.390000000Z][system] 云函数和 Hook 信息已更新
[2024-10-22T09:53:31.390000001Z][system] 部署完成:1 个实例部署成功
[2024-10-22T09:54:18.346983700Z][instance:test1] LeanEngine: /hello: 500: Error: Browser was not found at the configured executablePath (/usr/bin/google-chrome)
[2024-10-22T09:54:18.347023600Z][instance:test1] at ChromeLauncher.launch (/home/leanengine/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserLauncher.js:76:19)
...
代码
const browser = await puppeteer.launch({
executablePath: "/usr/bin/google-chrome",
args: ["--no-sandbox", "--disable-setuid-sandbox"],
});
版本信息
1 实例启动成功:{"runtime":"nodejs-v18.20.4","version":"3.8.0"}
2 "puppeteer": "^23.6.0"
其他
官方给出的github例子demo实在是太久远了,有没有考虑更新一下