#Error when deploying to Cloudflare Pages after adding Sentry to my NextJS project.

8 messages · Page 1 of 1 (latest)

river vine
#

I used the npx @sentry/wizard@latest -i nextjs command to add Sentry to my NextJS app.

I also added the SENTRY_AUTH_TOKEN env variable.

The following is the error I get... any ideas what I can do about this error?

...

✨ Upload complete!

Success: Assets published!

Error: Failed to publish your Function. Got error: Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_large)
river vine
#

Seems like this is not related to Sentry, just a Cloudflare limit was reached 😐

stark yoke
#

got a similar issue recently after adding sentry

#
11:53:16.218    Failed: generating Pages Functions failed. Check the logs above for more information. If this continues for an unknown reason, contact support: https://cfl.re/3WgEyrH```
stark yoke
#

tried to optimize the bundle size but no luck -- anyone have an ide?

sweet notch
#

@river vine @stark yoke removing sentry decreased my bundle size from 25mb to 4.5mb. Have you found a solution to enable Sentry and not bloat the bundle size?

stark yoke
#

sadly i got fed up and just migrated the entire app to vercel

river vine
#

lol same, hosting on vercel now