I cannot pass `env.MYBROWSER` as an argument to `puppeteer.launch`.
I have a question regarding TypeScript and trying to use puppeteer. I am encountering a type error. In the following sample code, I cannot pass
env.MYBROWSER
as an argument to puppeteer.launch
.
The error message for the argument is as follows:
Is there a solution to this issue?9 Replies
- tsconfig.json
- package.json devDependencies
The MyBrowser type should be
BrowserWorker
I believe. Worth mentioning as well this doesn't work in local dev, have to use dev --remote
Thanks to you, I was able to resolve the error. However, when I ran wrangler dev, I encountered a new error. Is this a bug?
did you see my comment about local dev?
You need to use remote dev, ex:
npx wrangler dev --remote
Sorry, I was able to execute it thanks to your advice. However, I've encountered a new error as follows:
ouch, do you have Workers Paid?
no..
Ah, so a subscription to the paid plan is necessary to use it. Thank you for clarifying. I had mistakenly thought it was available within the free tier. I greatly appreciate your assistance with this matter. You're a lifesaver. Thank you.
yea it is sorry, at least for this beta period/where they're not billing anyway. Not sure if they plan on eventually bringing it to free plan, I don't think they've said.
Thanks for the information.