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

require(...) is not a function #3

Closed
adamduffield opened this issue Jul 19, 2021 · 6 comments
Closed

require(...) is not a function #3

adamduffield opened this issue Jul 19, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@adamduffield
Copy link

When I use try to use this plugin with "puppeteer.use(require('puppeteer-extra-plugin-timezone')())"

I get:
image

Any suggestions as to what I should look at to fix this?

If i console.log the plugin, i get:
image

System:
OS: macOS 11.4
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Binaries:
Node: 14.16.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.12 - /usr/local/bin/npm
npmPackages:
jest: ^27.0.6 => 27.0.6

@clouedoc
Copy link
Owner

clouedoc commented Jul 19, 2021 via email

@adamduffield
Copy link
Author

Yes it works now. Thanks!

Is there any way to get it working when using password authentication for the proxies? If not, no worries, I will just use IP auth :)

@clouedoc
Copy link
Owner

clouedoc commented Jul 20, 2021 via email

@EasyChris
Copy link

EasyChris commented Jul 21, 2021

i have a same problems.

i use proxy for puppeteer config

when i use puppeteer.use(require("puppeteer-extra-plugin-timezone")());

it will some err _(...) is not a function

this is my launch config

 args: [
        `--proxy-server=${proxy}`,
        "--disable-web-security",
        "--disable-features=IsolateOrigins,site-per-process",
        "-wait-for-browser",
        "--no-sandbox",
        "--disable-setuid-sandbox",
        // "--single-process",
        "--disable-dev-shm-usage",
        "--shm-size=3gb",
        "--disable-web-security",
        "--lang=en-US,en",
      ],

is there use proxy config to make this error?

My agent is a locally directly accessible similar 127.0.0.1 no verification

@clouedoc
Copy link
Owner

@EasyChris thanks for trying out my plugin

Try this:

puppeteer.use(require("puppeteer-extra-plugin-timezone").default())

@clouedoc
Copy link
Owner

I'm going to close this issue in favour of #5

@adamduffield Regarding the authentication issue, I've noted some implementation ideas in #4

I'm too busy to contribute right now, but any help is welcome :)

@clouedoc clouedoc added the bug Something isn't working label Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants