chrisvfritz / prerender-spa-plugin

Prerenders static HTML in a single-page application.
MIT License
7.33k stars 634 forks source link

Puppeteer Issues on Oracle Linux 8 #454

Open nobu-sh opened 3 years ago

nobu-sh commented 3 years ago

Hiya, I am sorta new to linux so this may be a very dumb question but I am unable to build on Oracle Linux 8.

My config is simply:

new PrerenderSPAPlugin({
      staticDir: path.join(__dirname, 'dist'),
      routes: ['/'],
    }),

and I am getting this error

Error: Failed to launch chrome!
/home/opc/project/web/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: /home/opc/project/web/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: cannot execute binary file

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

    at onClose (/home/opc/project/web/node_modules/puppeteer/lib/Launcher.js:348:14)
    at Interface.<anonymous> (/home/opc/project/web/node_modules/puppeteer/lib/Launcher.js:337:50)
    at Interface.emit (node:events:406:35)
    at Interface.close (node:readline:586:8)
    at Socket.onend (node:readline:277:10)
    at Socket.emit (node:events:406:35)
    at endReadableNT (node:internal/streams/readable:1329:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
[Prerenderer - PuppeteerRenderer] Unable to start Puppeteer
/home/opc/project/web/node_modules/@prerenderer/renderer-puppeteer/es6/renderer.js:140
    this._puppeteer.close()
                    ^

TypeError: Cannot read property 'close' of null
    at PuppeteerRenderer.destroy (/home/opc/project/web/node_modules/@prerenderer/renderer-puppeteer/es6/renderer.js:140:21)
    at Prerenderer.destroy (/home/opc/project/web/node_modules/@prerenderer/prerenderer/es6/index.js:87:20)
    at /home/opc/project/web/node_modules/prerender-spa-plugin/es6/index.js:144:29
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What I Have Tried

EDIT: Btw I am also on an ARM-based processor

musakanneh commented 2 years ago

npm install puppeteer - this should work!

sonicwong commented 2 years ago

try this: sudo yum install libdrm libgbm libxshmfence -y