Не запускается Puppeteer, как исправить ошибку?
Ubuntu 18.04 - Начинаю запускать свое приложение на node js, но происходит ошибка, как исправить ее ?
>
[email protected] start /home/ubuntu
> nodejs app.js
Example app listening on port 3000!
(node:889) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/home/ubuntu/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/home/ubuntu/node_modules/puppeteer/lib/Launcher.js:615:20)
at Interface.<anonymous> (/home/ubuntu/node_modules/puppeteer/lib/Launcher.js:605:56)
at Interface.emit (events.js:322:22)
at Interface.close (readline.js:409:8)
at Socket.onend (readline.js:187:10)
at Socket.emit (events.js:322:22)
at endReadableNT (_stream_readable.js:1187:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:889) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:889) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Пробовал в терминал вводить ( Не помогло ):
sudo apt-get install gconf-service libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxss1 libxtst6 libappindicator1 libnss3 libasound2 libatk1.0-0 libc6 ca-certificates fonts-liberation lsb-release xdg-utils wget
Ответы (1 шт):
Автор решения: Антон Скородумов
→ Ссылка
Попробуйте установить пакет libgbm1
sudo apt-get install libgbm1