Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: puppeteer.launch(...).then(...) is not a function #894

Open
yogeshGroony opened this issue Jun 5, 2024 · 0 comments
Open

TypeError: puppeteer.launch(...).then(...) is not a function #894

yogeshGroony opened this issue Jun 5, 2024 · 0 comments
Labels
issue: bug report A bug has been reported needs triage

Comments

@yogeshGroony
Copy link

When I used the following code I got this error

import puppeteer from 'puppeteer-extra';
import pluginStealth from 'puppeteer-extra-plugin-stealth';
import {executablePath} from 'puppeteer';
puppeteer.use(pluginStealth()) 
puppeteer.launch({ headless:false, executablePath: executablePath() }).then(async browser => { 

version--

    "puppeteer": "^22.10.0",
    "puppeteer-core": "^22.10.0",
    "puppeteer-extra": "^3.3.6",
    "puppeteer-extra-plugin-stealth": "^2.11.2"

Solution

import puppeteer from 'puppeteer-extra';
import pluginStealth from 'puppeteer-extra-plugin-stealth';
import {executablePath} from 'puppeteer';

(async () => {
	await puppeteer.use(pluginStealth());
  // Launch the browser and open a new blank page
  const browser = await puppeteer.launch({ headless:false, executablePath: executablePath() });
@yogeshGroony yogeshGroony added issue: bug report A bug has been reported needs triage labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug report A bug has been reported needs triage
Projects
None yet
Development

No branches or pull requests

1 participant