yuyanghui / yuyanghui.github.io

0 stars 0 forks source link

Puppeteer 在linux下面需要安装依赖包才不会报错 #6

Open yuyanghui opened 2 years ago

yuyanghui commented 2 years ago

prerender-spa-plugin出现Failed to launch chrome 解决方案

1、确保 prerender-spa-plugin 配置中不包含headless 和 inject配置项

new PrerenderSPAPlugin({ routes: ["/future"], staticDir: path.join(__dirname, '../build'), renderer: new Renderer({ renderAfterTime: 5000 }) }) 2、在Linux 系统下安装依赖包,命令如下:

yum install libXScrnSaver atk java-atk-wrapper at-spi2-atk gtk3 libXt -y