-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next.js with deploy to Cloudflare Pages failed, due to limit of 25 MB, after adding Sentry #13723
Comments
hi @dimylkas, thanks for writing in. Could you please provide a minimal reproduction repo or stackblitz we can use to investigate this? |
@dimylkas no need for a repro. The server-side SDK has a certain size. As of now we don't have any plans to decrease its size (admittedly I wouldn't know how as there are certain restrictions around bundling). 25MB is an incredibly small amount. You can try using the |
Hi @lforst, Ok, then just a FYI - that i've prepared example - ( https://github.com/dimylkas/example-nt-cl-sentry-crush ) So, a certain size is bigger than that limit, right? And is there no way to deploy it there? Or communicate to CL about their issue. Regards, |
@dimylkas I'm afraid we can't do much about CF's limit. Maybe you could deploy part of the app to R2? See https://developers.cloudflare.com/pages/platform/limits/#file-size. |
Hi @andreiborza , There are no any assets, from " It's for the history and next user who will face the same problem |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
"@sentry/nextjs": "^8.30.0",
Framework Version
"react": "18.3.1", "next": "^14.2.5", "next-intl": "^3.17.2"
Link to Sentry event
Reproduction Example/SDK Setup
sentry.client.config.ts
sentry.edge.config.ts
sentry.server.config.ts
next.config.js
Steps to Reproduce
Expected Result
Successful deploy
Actual Result
During the build, I see that everything is fine and bundle size is correct.
...
| ▲ ┌ ƒ / 1.35 kB 191 kB
| ▲ ├ ○ /_not-found 1.03 kB 188 kB
| ▲ ├ ƒ /[locale] 24 kB 478 kB
| ▲ ├ ƒ /[locale]/(.)login 3.16 kB 321 kB
| ▲ ├ ƒ /[locale]/about-us 343 B 188 kB
...
Build Completed
Build Summary (@cloudflare/next-on-pages v1.13.2)
After i see logs:
Attaching additional modules:
...
│ next-on-pages-dist/cache/kv.js │ esm │ 0.35 KiB │
│ next-on-pages-dist/functions/[locale]/(.)login.func.js │ esm │ 1223.31 KiB │
│ next-on-pages-dist/functions/[locale]/about-us.func.js │ esm │ 1218.56 KiB │
...
Compiled Worker successfully
| Generated Pages Functions bundle size (26809243) is over the limit of 25.0 MiB
| 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
And it's failed because of generated Pages function.
I'm trying to understand, smth wrong with config? But I've followed the steps from docs and use npx
It's a right way that each page is wrapped with "withSentryConfig" and adds additional ±1.2 MB, so we hit the limit.
I've also removed this "withSentryConfig" from next.config and everything become normal
Cloudflare or Sentry issue?
The text was updated successfully, but these errors were encountered: