transitive-bullshit / agentic

AI agent stdlib that works with any LLM and TypeScript AI SDK.
https://agentic.so
MIT License
16.47k stars 2.15k forks source link

ERROR Error: Could not find Chromium (rev. 1069273). #176

Closed aviavinas closed 1 year ago

aviavinas commented 1 year ago

Verify latest release

Verify webapp is working

Environment details

Node 18 Vercel or Google cloud function (Same error at both place)

Describe the Bug

2022-12-20T18:29:31.934Z aa798731-0fbb-4d1d-a6ce-9556501fad3a ERROR Error: Could not find Chromium (rev. 1069273). This can occur if either

  1. you did not perform an installation before running the script (e.g. npm install) or
  2. your cache path is incorrectly configured (which is: /home/sbx_user1051/.cache/puppeteer). For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration. at ChromeLauncher.resolveExecutablePath (/var/task/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:120:27) at ChromeLauncher.executablePath (/var/task/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:166:25) at ChromeLauncher.launch (/var/task/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:70:37) at async handler (/var/task/.next/server/pages/api/chatg.js:33:21) at async Object.apiResolver (/var/task/node_modules/next/dist/server/api-utils/node.js:366:9) at async NextNodeServer.runApi (/var/task/node_modules/next/dist/server/next-server.js:481:9) at async Object.fn (/var/task/node_modules/next/dist/server/next-server.js:735:37) at async Router.execute (/var/task/node_modules/next/dist/server/router.js:247:36) at async NextNodeServer.run (/var/task/node_modules/next/dist/server/base-server.js:347:29) at async NextNodeServer.handleRequest (/var/task/node_modules/next/dist/server/base-server.js:285:20) 2022-12-20T18:29:31.935Z aa798731-0fbb-4d1d-a6ce-9556501fad3a
transitive-bullshit commented 1 year ago

This package will not work on Vercel or Google cloud functions (or any serverless functions) currently for a few reasons:

  1. Puppeteer is too large to install; we could use chrome-aws-lambda to reduce the size, but in my experience it's a pain to get working.
  2. Cloudflare recognizes data center IP addresses like AWS / GCP / Azure, and really restricts them. So we recommend using either a VPN or proxy to a residential IP address – or getting it working on your local machine first.