10 Replies
You could try making it an external dependency https://docs.convex.dev/functions/bundling#external-packages
Bundling | Convex Developer Hub
Bundling is the process of gathering, optimizing and transpiling the JS/TS
I'm doing this already
I have convex.json file and including the dependency
Interesting. Can you share your convex.json? Normally external packages don't count towards the size limit
Another thing to check that get's missed occasionally you have to use this in a
"use node";
action. https://docs.convex.dev/functions/actions#calling-third-party-apis-and-using-npm-packagesActions | Convex Developer Hub
Actions can call third party services to do things such as processing a payment
@lee my convex.json that's in my nextjs root dir
./convex/puppeteer.ts
actually if I remove that external dep array then I do not have that "maximum size" error. But browser (puppeteer) still ails to launch.It looks like you're importing "puppeteer-core" into your action, but it's not in "externalPackages" so i think it would get bundled in, instead of being installed on the server. Does it work if you expand "externalPackages" to include it?
no 😦
Can you add this back to external dependency and run
npx convex dev -v
. This will give detailed output of what is market as external and how big the rest is?
Unfortunatelly, we have a limit on zip package that includes both bundled and external packages.did you manage to get this to work in the end @kstulgys ?
nop, I think convex does not suport this, they mentioned on their docs as well