Hello everyone, I have a React + Vite frontend already deployed to the mainnet. My build output is in dist/
. The assets folder in dist/assets
contains all of my app’s compiled JS files. This folder is about 2.9MB in total, with some individual files as large as 900KB each. Assets are already gzip-compressed.
When I try to upgrade or reinstall this frontend canister (dfx canister install --mode upgrade --network ic
), I get this error:
Failed to create chunks
The replica returned an HTTP Error: status 400 Bad Request
error: malformed_request
details: HTTP body reading timed out
Interestingly, if I remove a few large files to bring the dist/assets
under 2MB, the deploy works fine (my frontend can’t display properly without those files, though). I have enough cycles to run the commands.
Could this be because of the 2MB limit? I thought it applied to individual files, and none of my files are over 1MB. Any workaround for this issue?