Can't install puppeteer on Ubuntu 20.04
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 8.0.0
- Platform / OS version: Ubuntu 20.04.2
- URLs (if applicable):
- Node.js version: 15.12.0
What steps will reproduce the problem?
- npm i puppeteer
What is the expected result?
To install
What happens instead?
0 verbose cli [
0 verbose cli '/snap/node/3790/bin/node',
0 verbose cli '/home/username/.npm-packages/bin/npm',
0 verbose cli 'i',
0 verbose cli 'puppeteer'
0 verbose cli ]
1 info using npm@7.6.3
2 info using node@v14.16.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/home/username/.npm-packages/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/home/username/project/srv/docker/scrape-alert/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/home/username/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/home/username/.npm-packages/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 6ms
19 verbose npm-session 5659d7bc3b0bc371
20 timing npm:load Completed in 11ms
21 timing arborist:ctor Completed in 0ms
22 timing idealTree:init Completed in 51ms
23 timing idealTree:userRequests Completed in 1ms
24 silly idealTree buildDeps
25 silly fetch manifest puppeteer@*
26 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules
27 http fetch GET 200 https://registry.npmjs.org/puppeteer 13ms (from cache)
28 silly placeDep ROOT puppeteer@8.0.0 OK for: scrape-alert@1.0.0 want: *
29 timing idealTree:#root Completed in 25ms
30 timing idealTree:node_modules/puppeteer Completed in 0ms
31 timing idealTree:buildDeps Completed in 25ms
32 timing idealTree:fixDepFlags Completed in 1ms
33 timing idealTree Completed in 79ms
34 timing reify:loadTrees Completed in 112ms
35 timing reify:diffTrees Completed in 2ms
36 silly reify moves {}
37 timing reify:retireShallow Completed in 0ms
38 timing reify:createSparse Completed in 0ms
39 timing reify:loadBundles Completed in 0ms
40 timing reifyNode:node_modules/puppeteer Completed in 117ms
41 timing reify:unpack Completed in 118ms
42 timing reify:unretire Completed in 0ms
43 timing build:queue Completed in 0ms
44 info run puppeteer@8.0.0 install node_modules/puppeteer node install.js
45 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 381ms
46 timing auditReport:getReport Completed in 382ms
47 timing auditReport:init Completed in 0ms
48 timing reify:audit Completed in 382ms
49 info run puppeteer@8.0.0 install { code: 1, signal: null }
50 timing reify:rollback:createSparse Completed in 33ms
51 timing reify:rollback:retireShallow Completed in 0ms
52 timing command:i Completed in 13651ms
53 verbose stack Error: command failed
53 verbose stack at ChildProcess.<anonymous> (/home/username/.npm-packages/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
53 verbose stack at ChildProcess.emit (events.js:315:20)
53 verbose stack at maybeClose (internal/child_process.js:1048:16)
53 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
54 verbose pkgid puppeteer@8.0.0
55 verbose cwd /home/username/project/srv/docker/scrape-alert
56 verbose Linux 5.8.0-44-generic
57 verbose argv "/snap/node/3790/bin/node" "/home/username/.npm-packages/bin/npm" "i" "puppeteer"
58 verbose node v14.16.0
59 verbose npm v7.6.3
60 error code 1
61 error path /home/username/project/srv/docker/scrape-alert/node_modules/puppeteer
62 error command failed
63 error command sh -c node install.js
64 verbose exit 1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
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 >Ubuntu Install Puppeteer - Kevin FOO - Medium
Run the commands below to install Puppeteer in Ubuntu 20.04. sudo apt update sudo apt upgrade -y sudo apt install -y npm npm...
Read more >node.js - Cannot Run Puppeteer (Chromium) on Ubuntu
First check if any dependencies are missing. Go to: your_project_path/node_modules/puppeteer/.local ...
Read more >Puppeteer
Puppeteer is a Node.js library which provides a high-level API to control Chrome/Chromium over the DevTools Protocol.
Read more >Troubleshooting
Make sure all the necessary dependencies are installed. You can run ldd chrome | grep not on a Linux machine to check which...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This appears to be related to the snap distribution of node. After installing the NodeSource distro puppeteer installed successfully.
Same here, installing from NodeSource distro solved it.