-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
Stealth plugins not found when making .exe with pkg #22
Comments
Whoops, I have an idea why that might be - I rewrote the base plugin in typescript and changed the exports to be named. Let me check! |
@AsianPotato could you run |
Nevermind I found the issue - fixing it now 😄 |
Thanks a lot for the quick reply! |
@AsianPotato I just published Rerunning Apologies for that bug, I rewrote parts in typescript just yesterday and for some mysterious reasons the CI tests didn't complain about this issue. 😄 |
Keep in mind that the example script you're using is making use of two plugins that need to be installed. So next to Maybe I should make that clearer in the readme. |
@AsianPotato thanks a lot for the issue, I've improved the main example to be much clearer for the next person. :-) |
Hi
How can I fix this? thank you @berstend |
Getting the same issue as @Dam998...
|
@eduardoewgo could you check with the latest versions? (at the time of writing): |
@eduardoewgo I fixed it using nexe instead of pkg |
@Dam998 kinda hard to move away from @berstend I've installed the newest version and the error persists 😞 Just to give some context This is the module loading up puppeteer.
This is the message I got
Any other suggestion, @berstend ? |
@eduardoewgo well, the issue is that their bundler trips over the dynamic imports: vercel/pkg#343 so what you might want to try is hardcoding the evasion imports somewhere in your code like this (to make the bundler aware of them): require('puppeteer-extra-plugin-stealth/evasions/chrome.app')
// ... |
There's also stuff like this you might want to look into: "pkg": {
"scripts": "node_modules/puppeteer/lib/*.js"
} (using that for the stealth evasions) |
@berstend only solution was to manually install both It's the only packag that is not being properly compiled by pkg/nexe. Well, not sure how viable this is gonna be once this is finished, but it's the only way I could get a working |
btw, I am using typescript - shouldn't matter, but just in case. |
@eduardoewgo what do you mean by
|
In the output dir, simply run |
|
Wdym? |
I got it working with the pkg. I included the whole stealth module in the
While compiling with pkg you will get bunch of warnings that 'ava' module not found. You can ignore them. That module is used in an example .js file which is included with the plugin. You won't be needing that. |
Did anybody get it working? |
@rabbit-yashow I updated my global |
After giving up, a new requirement brought me again to this issue and I finally got it to work using @lockHrt 's suggestion THANKS A LOT... in my case I added
|
in which package package.json you write this json so that it would work? |
When I use that piece of code it doesn't work, giving me this error
When I remove
puppeteer.use(require("puppeteer-extra-plugin-stealth")())
it works fineThe text was updated successfully, but these errors were encountered: