[ERROR] Error: Pages only supports files up to 26.2 MB in size

Can i have a guide on how to deploy Embedded sanity studio (/admin || /studio) to cloudfare. Have been facing this error passed some weeks and have tried to deploy sanity studio itself, i don't know what am doing wrong pls. This is the end part of the error 21:26:32.408Finished 21:26:32.409Note: No functions dir at /functions found. Skipping.21:26:32.409Validating asset output directory21:26:33.612 Deploying your site to Cloudflare's global network...21:26:35.97821:26:36.117✘ [ERROR] Error: Pages only supports files up to 26.2 MB in size21:26:36.11821:26:36.118 cache/webpack/client-production/0.pack is 205 MB in size21:26:36.11821:26:36.11821:26:36.118If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose21:26:36.132Failed: upload process exited with code: 121:26:37.104 Failed: an internal error occurred. If this continues, contact support: https://cfl.re/3WgEyrH21:26:37.104Error: Failed to publish assets. For support, join our Discord (https://discord.gg/cloudflaredev) or create a ticket and reference the deployment ID: 58771cf4-180f-4f2f-ba46-f3ba0c6193fc
4 Replies
Hello, I’m Allie!
That means that some part of Sanity Studio is just too big to be deployed to Pages. You can try deploying that file to R2 instead, and then use Functions to serve it.
Rasheeddev
RasheeddevOP14mo ago
Please what do you mean by R2 🙁 Hmm.. okay. Please can you explain what you meant by the <output directory>, i don't really get it. with Next + Sanity so am i to build with [ npx next build && rm -rf <./out>/cache ] ? Okay.. Thanks I really appreciate. I will get back to you once i got Am getting some error while running this command next build && rm -rf ./out/cache At line:1 char:16 + npx next build && rm -rf ./out/cache + The token '&&' is not a valid statement separator in this version. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : InvalidEndOfLine I tried running the command one after the other and i got this 🔻 Remove-Item : A parameter cannot be found that matches parameter name 'rf'. At line:1 char:7 + rmdir -rf out/cache + ~ + CategoryInfo : InvalidArgument: (:) [Remove-Item], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand Please can you help me with more clarificaton on this
Chaika
Chaika14mo ago
That is what you'd add to your Build Command to run as part of the build, not run locally
Rasheeddev
RasheeddevOP14mo ago
Okay. I tried that as well . it gave me the same error npx next build rm -rf ./out/cache 02:20:05.340 To address issues that do not require attention, run: 02:20:05.340 npm audit fix 02:20:05.341
02:20:05.341 To address all issues (including breaking changes), run: 02:20:05.341 npm audit fix --force 02:20:05.341
02:20:05.342 Run npm audit for details. 02:20:05.370 Executing user command: npx next build rm -rf ./out/cache 02:20:07.103 Unknown or unexpected option: -r 02:20:07.123 Failed: Error while executing user command. Exited with error code: 1 02:20:07.132 Failed: build command exited with code: 1 02:20:12.451 Failed: error occurred while running build command It worked buh the website is not working page not found And have deployed on vercel which it worked perfectly https://durodolaportfolio.pages.dev/ What can cause that pls
Want results from more Discord servers?
Add your server