zawa
zawa
CDCloudflare Developers
Created by zawa on 4/17/2024 in #workers-help
I cannot pass `env.MYBROWSER` as an argument to `puppeteer.launch`.
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.
12 replies
CDCloudflare Developers
Created by zawa on 4/17/2024 in #workers-help
I cannot pass `env.MYBROWSER` as an argument to `puppeteer.launch`.
no..
12 replies
CDCloudflare Developers
Created by zawa on 4/17/2024 in #workers-help
I cannot pass `env.MYBROWSER` as an argument to `puppeteer.launch`.
Sorry, I was able to execute it thanks to your advice. However, I've encountered a new error as follows:
[ERROR] Error on remote worker: APIError: A request to the Cloudflare API (/accounts/[ACCOUNT_ID]/.../edge-preview) failed.
...
...
...
notes: [
{
text: 'workers.api.error.no_access_to_browser_worker [code: 10088]'
}
],
location: undefined,
kind: 'error',
code: 10088
[ERROR] Error on remote worker: APIError: A request to the Cloudflare API (/accounts/[ACCOUNT_ID]/.../edge-preview) failed.
...
...
...
notes: [
{
text: 'workers.api.error.no_access_to_browser_worker [code: 10088]'
}
],
location: undefined,
kind: 'error',
code: 10088
12 replies
CDCloudflare Developers
Created by zawa on 4/17/2024 in #workers-help
I cannot pass `env.MYBROWSER` as an argument to `puppeteer.launch`.
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?
[wrangler:err] TypeError: Cannot read properties of undefined (reading 'fetch')
[wrangler:err] TypeError: Cannot read properties of undefined (reading 'fetch')
12 replies
CDCloudflare Developers
Created by zawa on 4/17/2024 in #workers-help
I cannot pass `env.MYBROWSER` as an argument to `puppeteer.launch`.
- tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"],
"isolatedModules": true,
"noEmit": true,
"strict": true,
"esModuleInterop": true
},
"include": ["src", "types"]
}
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"],
"isolatedModules": true,
"noEmit": true,
"strict": true,
"esModuleInterop": true
},
"include": ["src", "types"]
}
- package.json devDependencies
"devDependencies": {
"@cloudflare/puppeteer": "^0.0.6",
"@cloudflare/vitest-pool-workers": "^0.1.0",
"@cloudflare/workers-types": "^4.20240405.0",
"typescript": "^5.0.4",
"vitest": "1.3.0",
"wrangler": "^3.0.0"
}
"devDependencies": {
"@cloudflare/puppeteer": "^0.0.6",
"@cloudflare/vitest-pool-workers": "^0.1.0",
"@cloudflare/workers-types": "^4.20240405.0",
"typescript": "^5.0.4",
"vitest": "1.3.0",
"wrangler": "^3.0.0"
}
12 replies