Ubuntu Install Puppeteer

Kevin FOO
Jun 5, 2020

--

Run the commands below to install Puppeteer in Ubuntu 20.04.

sudo apt update
sudo apt upgrade -y
sudo apt install -y npm
npm install puppeteer

Use the script below to test if Puppeteer was installed successfully. Let’s name the script “test.js”.

To execute the file. Run

node test.js

You’ll probably hit error, complaining about missing libraries. These are all the libraries missing. Just run the below command and retest the script again.

sudo apt install -y libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxi-dev libxtst-dev libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0 libgbm1

Screenshot.png should be successfully generated now.

< Back to all the stories I had written

--

--

Kevin FOO
Kevin FOO

Written by Kevin FOO

A software engineer, a rock climbing, inline skating enthusiast, a husband, a father.

Responses (1)