运行代码提示
Error: Failed to launch the browser process!
/www/wwwroot/vtopworld/server/node_modules/_puppeteer@13.0.1@puppeteer/.local-chromium/linux-938248/chrome-linux/chrome: error while loading shared。******* cannot open shared object file: No such file or directory。
执行linux命令行
sudo yum install -y chromium
继续提示报错信息:
Error: Failed to launch the browser process!
[0115/105742.718414:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
解决代码:
puppetteer.launch({
headless: true,
args: ['--no-sandbox']
})
参考:
Fixed: CentOS 8 ---- Error: Failed to launch the browser process!
ERROR:zygote_host_impl_linux.cc(89) Running as root without --no-sandbox is not supported
网友评论