Skip to content

Commit

Permalink
Resolve Puppeteer error
Browse files Browse the repository at this point in the history
Resolve Error cannot read property '_launcher' of undefined
More info:
https://stackoverflow.com/questions/69494700/puppeteer-launcher-error-results-with-undefined
  • Loading branch information
M4TH76 authored Mar 28, 2022
1 parent 0906f64 commit 67b0546
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Process from 'process';
import {config} from './config'; // Needs to be loaded first
import {startAPIServer, stopAPIServer} from './web';
import {Browser, launch} from 'puppeteer';
import Puppeteer, { Browser } from "puppeteer";
import {getSleepTime} from './util';
import {logger} from './logger';
import {storeList} from './store/model';
Expand Down Expand Up @@ -107,7 +107,7 @@ export async function launchBrowser(): Promise<Browser> {
}

await stop();
const browser = await launch({
const browser = await Puppeteer.launch({
args,
defaultViewport: {
height: config.page.height,
Expand Down

0 comments on commit 67b0546

Please sign in to comment.