Import got-scraping in ESM or CommonJS
masterThe module is ESM only. You must use import expressions or the import() method.
If your project is ESM:
import { gotScraping } from 'got-scraping';If you are using CommonJS and cannot migrate to ESM, import it within an async context using dynamic imports:
let gotScraping;
async function fetchWithGotScraping(url) {
gotScraping ??= (await import('got-scraping')).gotScraping;
return gotScraping.get(url);
}Requirement: Node.js >=16 is required.