(node:14372) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added to [process]. Use emitter.setMaxListeners() to increase limit
JavaScript
/*
https://github.com/puppeteer/puppeteer/issues/594#issuecomment-325919885
*/
const puppeteer = require('puppeteer')
const R = require('rambda')
process.setMaxListeners(Infinity); // <== Important line
const resolution = {
x : 1920,
y : 1080,
}
// ...
Note: you don't need to launch browser just to create a page. Instead, you can open multiple pages in the same browser:
const puppeteer = require('puppeteer')
const R = require('rambda')
const resolution = {
x : 1920,
y : 1080,
}
const args = [
'--disable-gpu',
`--window-size=${ resolution.x },${ resolution.y }`,
'--no-sandbox',
]
let browser;
const work = async () => {
const page = await browser.newPage()
const url = 'https://ilearnsmarter.com/learning-meme'
await page.setViewport({
width : resolution.x,
height : resolution.y,
})
await page.goto(url, { waitUntil : 'networkidle' })
await page.close();
}
const fn = async () => {
browser = await puppeteer.launch({
headless : true,
handleSIGINT : false,
args : args,
})
const promised = R.range(0, 12).map(() => work())
await Promise.all(promised)
browser.close()
console.log('DONE')
}
fn()
Also in JavaScript:
- Title
- how to limit characters in number input js
- Category
- JavaScript
- Title
- get id of clicked element javascript
- Category
- JavaScript
- Title
- include gif in react
- Category
- JavaScript
- Title
- group by in javascript
- Category
- JavaScript
- Title
- bootstrap 4 hide modal via javascript
- Category
- JavaScript
- Title
- how to add prototype in javascript
- Category
- JavaScript
- Title
- facebook integration in node.js
- Category
- JavaScript
- Title
- create array with specific size javascript
- Category
- JavaScript
- Title
- Add object to array javascript
- Category
- JavaScript
- Title
- comment in react
- Category
- JavaScript
- Title
- how to get session javascript ws3schools
- Category
- JavaScript
- Title
- graphql react filtering
- Category
- JavaScript
- Title
- how to remove an object from array in react native
- Category
- JavaScript
- Title
- how to use chart js in vue js
- Category
- JavaScript
- Title
- handling event in jsx
- Category
- JavaScript
- Title
- email regex javascript
- Category
- JavaScript
- Title
- how to return a string x amount in javascript without using . repeat
- Category
- JavaScript
- Title
- coin change problem all combinations javascript
- Category
- JavaScript
- Title
- get month in two digit in javascript date
- Category
- JavaScript
- Title
- async await javascript
- Category
- JavaScript
- Title
- code to launch browser using javascript
- Category
- JavaScript
- Title
- check array values equal js
- Category
- JavaScript
- Title
- how to get a random element of an array javascript
- Category
- JavaScript
- Title
- await async sleep
- Category
- JavaScript
- Title
- angular subscribe
- Category
- JavaScript
- Title
- javascript and
- Category
- JavaScript
- Title
- How to check whether a checkbox is checked in jQuery?
- Category
- JavaScript
- Title
- how to get element from arraylist react
- Category
- JavaScript
- Title
- how to close another browser tab with javascript
- Category
- JavaScript
- Title
- angular rebuild
- Category
- JavaScript
- Title
- how to loop over dom objects javascript
- Category
- JavaScript
- Title
- how to convert audio blocb to base64 string
- Category
- JavaScript
- Title
- how to get the height of window in javascript
- Category
- JavaScript
- Title
- javascript adding an array to an array
- Category
- JavaScript
- Title
- Vue.js force to reload re-render
- Category
- JavaScript
- Title
- .includes javascript
- Category
- JavaScript
- Title
- busca binária em javascript
- Category
- JavaScript
- Title
- create element javascript with class
- Category
- JavaScript
- Title
- Alert.alert closing expo
- Category
- JavaScript
- Title
- discord.js ticket system stackoverflow
- Category
- JavaScript
- Title
- how to include local image files in javascript object
- Category
- JavaScript
- Title
- ad data to js object
- Category
- JavaScript
- Title
- check if string contains substring javascript
- Category
- JavaScript
- Title
- convert string to char array javascript
- Category
- JavaScript
- Title
- how to add onclick event in javascript
- Category
- JavaScript
- Title
- bind and unbind jquery validation
- Category
- JavaScript
- Title
- create an element jquery
- Category
- JavaScript
- Title
- bq show pretty json
- Category
- JavaScript
- Title
- express json body
- Category
- JavaScript
- Title
- how to get data from localstorage in javascript
- Category
- JavaScript
- Title
- ajax laravel get data
- Category
- JavaScript
- Title
- javascript ajax post send an object
- Category
- JavaScript
- Title
- go to anchor jquery
- Category
- JavaScript
- Title
- get the state of a checkbox
- Category
- JavaScript
- Title
- assign array to another array javascript
- Category
- JavaScript
- Title
- formatDoubl js
- Category
- JavaScript
- Title
- how to use for of in javascript
- Category
- JavaScript
- Title
- javascript array to string without commas
- Category
- JavaScript
- Title
- flowjs attributes
- Category
- JavaScript
- Title
- conditional jsx property
- Category
- JavaScript
- Title
- how to append select option in jquery
- Category
- JavaScript
- Title
- hover jquery
- Category
- JavaScript
- Title
- convert class object to json python
- Category
- JavaScript
- Title
- how to make text come up with javascript
- Category
- JavaScript
- Title
- fetch api based on id nodejs and mongodb
- Category
- JavaScript
- Title
- changing columns for table requires doctrine dbal install doctrine/dbal
- Category
- JavaScript
- Title
- how to use react components
- Category
- JavaScript
- Title
- angular run behind proxy
- Category
- JavaScript
- Title
- How do you start a Node Application, if the entry file is index.js:
- Category
- JavaScript
- Title
- $pull mongoose
- Category
- JavaScript
- Title
- angular themeable components
- Category
- JavaScript
- Title
- binary search in js
- Category
- JavaScript
- Title
- array sort by key javascript
- Category
- JavaScript
- Title
- How to insert an element after another element in JavaScript without using a library
- Category
- JavaScript
- Title
- () = javascript
- Category
- JavaScript
- Title
- how to import npm packages in node.js?
- Category
- JavaScript
- Title
- check if a key exists in an object javascript
- Category
- JavaScript
- Title
- express how to access ajax post data
- Category
- JavaScript
- Title
- javascript base64 encode
- Category
- JavaScript
- Title
- generate unique id javascript
- Category
- JavaScript
- Title
- call function javascript
- Category
- JavaScript
- Title
- charat javascript
- Category
- JavaScript
- Title
- filter array react
- Category
- JavaScript
- Title
- how to update all node libraries
- Category
- JavaScript
- Title
- funcao com o botao esc do teclado javascript
- Category
- JavaScript
- Title
- how to create a new react native project
- Category
- JavaScript
- Title
- get parent element using jquery
- Category
- JavaScript
- Title
- how to create request body javascript
- Category
- JavaScript
- Title
- casl react
- Category
- JavaScript
- Title
- express router file
- Category
- JavaScript
- Title
- javascript add scroll listener
- Category
- JavaScript
- Title
- const{}=
- Category
- JavaScript
- Title
- how to pass a value to a react funtion without immediately firing it
- Category
- JavaScript
- Title
- ERROR in ./src/app/pages/auth/auth.module.ngfactory.js Module not found: Error: Can't resolve '@angular/material/core/index'
- Category
- JavaScript
- Title
- HTML5 Accesskey Attribute: you may not need JavaScript to add Keyboard Shortcuts
- Category
- JavaScript
- Title
- angular moment pipe timeAgo
- Category
- JavaScript
- Title
- how to pass a variable to jspf
- Category
- JavaScript
- Title
- how to right text with js
- Category
- JavaScript
- Title
- check if message mentions users discord js
- Category
- JavaScript
- Title
- javascript append to object
- Category
- JavaScript