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.

[Bug]: Pupeeteer does not launch in latest version

See original GitHub issue

Bug description

I am running pupeteer in WSL, ubuntu 20.04. I was able to run puppeteer v 18.1.0 by adding my chrome.exe from Windows to $PATH and launching puppeteer with

browser = await puppeteer.launch({ 
      executablePath: 'chrome.exe', 
      headless: true,
      args: ['--no-sandbox', '--disable-setuid-sandbox']
    });

However in the latest version (18.2.1) I get the error

FAIL src/App.e2e.test.js ● Test suite failed to run

Cannot find module 'puppeteer-core/internal/common/DeviceDescriptors.js' from 'node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js'

Require stack:
  node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js
  src/App.e2e.test.js

  at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:324:11)
  at Object.<anonymous> (node_modules/puppeteer/src/puppeteer.ts:18:1)

Puppeteer version

18.2.1

Node.js version

16.17.0

npm version

8.19.2

What operating system are you seeing the problem on?

Windows

Relevant log output

No response

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
white-wolf97commented, Nov 30, 2022

Hi, why is it closed? I think the problem is not resolved, it is happenning to me right now. I have react-scripts 5.0.1 too, with puppeteer 19.3.0

3reactions
hitesh22bcommented, Nov 23, 2022

I am facing the same issue even after upgrading jest to the latest version

"puppeteer": "^19.2.2",
 "@types/jest": "^29.2.3",
 "@types/jest": "^29.2.3",
"jest": "^29.3.1"
Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Puppeteer is failing to launch the browser in local
Your script works perfectly, there must be some dependency issue. Can you try to: (1) uninstall puppeteer npm package with your preferred ...
Read more >
This version has been deprecated - puppeteer - npm
A high-level API to control headless Chrome over the DevTools Protocol. Latest version: 17.1.0, last published: 7 hours ago.
Read more >
Runtime versions using Node.js and Puppeteer
Explains the versions of canary runtimes, libraries, and configuration information.
Read more >
Puppeteer Tutorial | Fixing Common Errors while installing ...
Check Node version, Chromium version and Puppeteer version. Downgrade all or, any if that helps. Often, there are bugs and only way to...
Read more >
Error while launching headless browser using puppeteer.
Here is the script const puppeteer=require("puppeteer"); ... ,but I have deleted that and gonna check with latest version to see if that was...
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