prerender-spa-plugin linux运行报错问题

使用prerender-spa-plugin进行react预渲染时,本地开发打包没问题,但在服务器上部署是,出现Error: Failed to launch chrome!

prerender-spa-plugin linux运行报错问题_第1张图片

在服务器上分别执行下面两行命令即可

yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 -y
yum install ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc -y

再次打包时如果出现如下错误,更新glib2

chrome-linux/chrome: symbol lookup error: /lib64/libpango-1.0.so.0:
undefined symbol: g_log_structured_standard

yum update glib2

你可能感兴趣的:(前端学习)