question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm install puppeteer fails on Ubuntu 18.04 LTS

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: v5.3.0
  • Platform / OS version: Ubuntu 18.04 LTS
  • URLs (if applicable):
  • Node.js version: v8.10.0

What steps will reproduce the problem?

I try to install puppeteer on my Ubuntu 18.04 LTS instance using npm install puppeteer

Please include code that reproduces the issue.

  1. npm install puppeteer

What is the expected result?

Install is successful

What happens instead?

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.

Having issues installing puppeteer on Ubuntu as noted above, some advice on how to fix this would be much appreciated! Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
AviVahlcommented, Sep 23, 2020

The version of Node.js (8) is outdated. Current puppeteer versions support "node": ">=10.18.1".

1reaction
AviVahlcommented, Dec 1, 2020

You are running sudo npm. run: sudo node -v What does it say?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Puppeteer install fails on Ubuntu 18.04 LTS - Stack Overflow
I am trying to install puppeteer on a VPS hosted by Linode (Ubuntu 18.04 LTS). I run npm install puppeteer and run into...
Read more >
Installing Puppeteer on an Ubuntu AWS EC2 Instance
Installing Puppeteer on an Ubuntu AWS EC2 Instance · Go to your project directory · Install NodeJS/npm if you haven't · Run: sudo...
Read more >
Troubleshooting - Puppeteer
The most common cause is a bug in Node.js v14.0.0 which broke extract-zip , the module Puppeteer uses to extract browser downloads into...
Read more >
How to Install & Configure Puppeteer on Ubuntu 18.04 LTS
Today we will learn to install Puppeteer on top of Ubuntu 18.04 LTS by following few easy steps. We assume you don't have...
Read more >
Puppeteer on Ubuntu 16.04 doesn't work
apt install puppeteer (and all required files for my app). Used npm to run it with node.js. I made a .js script which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found