Apify Discord Mirror

Updated 5 months ago

Can we run crawlee in Vercel edge functions?

At a glance

The community member is asking if they can run the Crawlee library in Vercel Edge functions. They mention that Edge functions are cheaper and don't have a maximum execution timeout, but they are getting a "crawlee is not defined" error when trying to use it in Edge functions, while it works fine in normal serverless API routes. The community member has followed some instructions from a Discord channel to address a similar Puppeteer error, but the issue with Crawlee in Edge functions remains unresolved.

Useful resources
Hello,

Can we run crawlee in Vercel Edge functions? The interesting this with edge functions, besides the fact that it's cheaper, is that it doesn't have a maximum execution timeout as long you keep streaming back something to the client.

Followed the instructions here since I was getting the same puppeteer error: https://discord.com/channels/801163717915574323/1178072249362813009

It works fine in a "normal" serverless API routes but I get Error [ReferenceError]: crawlee is not defined when in edge functions.
Add a reply
Sign up and join the conversation on Discord