Ошибка установки Puppeteer в Ubuntu 18.04 LTS

#puppeteer #google-chrome-headless

#puppeteer #google-chrome-без головы

Вопрос:

Я пытаюсь установить puppeteer на VPS, размещенный Linode (Ubuntu 18.04 LTS).

Я запускаю npm install puppeteer и сталкиваюсь со следующей ошибкой:

 unhandledPromiseRejectionWarning: /home/kekearif/meh/node_modules/puppeteer/lib/cjs/puppeteer/install.js:138
                    catch {
                          ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at download (/home/kekearif/meh/node_modules/puppeteer/install.js:35:7)
(node:11036) 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(). (rejection id: 1)
(node:11036) [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.
meh@1.0.0 /home/kekearif/meh
└── puppeteer@5.3.0  extraneous

npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN meh@1.0.0 No description
npm WARN meh@1.0.0 No repository field.
  

Есть идеи, как это исправить?

Комментарии:

1. Вы установили зависимости, перечисленные здесь? github.com/puppeteer/puppeteer/blob/main/docs /…

2. Спасибо. Кажется, одна или две зависимости отсутствуют, а затем выяснилось, что моя версия node также недостаточно новая. Исправлено. приветствия