Puppeteer-Bypass icon indicating copy to clipboard operation
Puppeteer-Bypass copied to clipboard

TypeError: API is not a constructor

Open rainb3rry opened this issue 10 months ago • 0 comments

Receiving this error

const bypass = new API();
               ^

TypeError: API is not a constructor

on this setup,

const API = require("./Puppeteer-Bypass/built/API");
const bypass = new API();

(
    async () => {
        const result = await bypass.request("https://accounts.shopify.com", { method: "GET"
           
        });

        console.log(result);
    }
)();

tried also with const API = require("./Puppeteer-Bypass/built/API").default; and

export class API {
,
export default class API {

on API.d.ts file..

any solutions?

rainb3rry avatar Mar 28 '24 06:03 rainb3rry