[Bug]: Cannot find module 'puppeteer-core/internal/common/DeviceDescriptors.js'

See original GitHub issue

Bug description

Steps to reproduce the problem: Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-110-generic x86_64)

  1. npm i puppeteer --save
  2. create script from source https://github.com/checkly/puppeteer-examples/blob/master/1. basics/screenshots.js
  3. node test.js

Puppeteer version

19.0.0

Node.js version

v10.19.0

npm version

6.14.4

What operating system are you seeing the problem on?

Linux

Relevant log output

Error: Cannot find module 'puppeteer-core/internal/common/DeviceDescriptors.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/var/www/tariffer/node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js:33:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
OrKoNcommented, Oct 18, 2022

@elephantux we don’t support Node 10, could you try with Node 14 at least.

0reactions
OrKoNcommented, Oct 18, 2022

Then you should do like the message says: 1) either run as a non-root 2) or add --no-sandbox for the launch args. I recommend running as a non-root user.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'puppeteer-core/internal/common ...
I was able to fix it with: npm i puppeteer@18.1.0. Then adding chrome.exe from Windows to my $PATH. And changing the test to...
Read more >
[Bug]: Pupeeteer does not launch in latest version #9121
Bug description I am running pupeteer in WSL, ubuntu 20.04. ... Cannot find module 'puppeteer-core/internal/common/Device.js' from ...
Read more >
Troubleshooting
Cannot find module 'puppeteer-core/internal/. ... The most common cause is a bug in Node.js v14.0.0 which broke extract-zip , the module Puppeteer uses...
Read more >
Error: Cannot find module 'puppeteer/DeviceDescriptors'
Computer engineer interested in programming, electronics, application architecture, data visualization, automation and performance optimization.
Read more >
puppeteer-core
Puppeteer is a Node.js library which provides a high-level API to control Chrome/Chromium over the DevTools Protocol.
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