Replies: 1 comment 1 reply
-
Using serverless hosting, this will be near impossible because it will rely on binaries. You can take a look at cloudflare browser rendering https://developers.cloudflare.com/browser-rendering/, but I don't think there will be an equivalent in firebase. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using Puppeteer there's an issue where chrome isn't found. My understanding is that a prod build will bundle all dependencies. When I deploy to firebase cloud functions there's no indication that 'npm ci' is being run in the logs so chrome is never downloaded for Puppeteer to use.
Not sure how to proceed. Is it possible to exclude some dependencies from the build bundle so that they're installed on the remote environment? There is a puppeteer npx command to manually download chrome but no obvious way to execute it with nitro + firebase deploy.
My use case is having a server route do a simple scrape of some web page using Puppeteer. It works locally on the dev server but this issue with bundlers is documented on Puppeteer's own site with no workable solution for nitro mentioned.
Beta Was this translation helpful? Give feedback.
All reactions