D
Deno

help

Deploying WASM via Deno Deploy Github Actions

Ddiversable12/21/2023
Hello, I'm trying to deploy a Leptos project that serves a .wasm bundle for the frontend, and uses wasm on the backend as well. However, I seem to be running into a file size limit for Deno Deploy (or the Deno Deploy github action?). This is the error I'm getting: APIError: The deployment failed: Total static file size is too large: 1409974524 bytes (allowed is 1073741824 bytes) Is there any way of getting around this file size limit? Here's the repo, if that helps.. (I'm trying to deploy using Github Actions) https://github.com/diversable/leptos_hackernews_deno_deploy
GitHub
GitHub - diversable/leptos_hackernews_deno_deploy
Contribute to diversable/leptos_hackernews_deno_deploy development by creating an account on GitHub.
DAHDeno AI Helper12/22/2023
The error message you're encountering indicates that the total size of the static files you're trying to deploy exceeds the 1 gigabyte limit imposed by Deno Deploy. According to the documentation, when uploading assets to a deployment, the total size of all files within the deployment (source files and static files) should not exceed 1 gigabyte. To address this issue, you have a few options: 1. Optimize Your Assets: Try to reduce the size of your .wasm files and any other assets you're deploying. This could involve using tools to minimize and compress your files or splitting larger modules into smaller ones if possible. 2. External Hosting: If optimization isn't enough, consider hosting larger assets on a separate service and loading them from your Deno Deploy application via URLs. This way, you can bypass the file size limit for the deployment itself. 3. Contact Deno Support: If you have a use case that exceeds the file size limits and you believe it's justified, the documentation suggests reaching out to Deno support. They may be able to provide further assistance or discuss potential options for your specific scenario. Unfortunately, there isn't a direct way to bypass the file size limit through configuration or settings in Deno Deploy or GitHub Actions. The limit is enforced to ensure fair use of resources on the platform. Here's a snippet from the documentation regarding the maximum size for deployments:
## Maximum size for deployments​

When uploading assets to a deployment, the total size of all files within the
deployment (source files and static files) should not exceed 1 gigabyte.
## Maximum size for deployments​

When uploading assets to a deployment, the total size of all files within the
deployment (source files and static files) should not exceed 1 gigabyte.
For your current situation, you'll need to consider one of the above strategies to bring your deployment within the allowed limits. 🦕
Ddiversable12/22/2023
Any humans out there who can help with this issue?
Ffyrfnn12/22/2023
i think you can host the wasm file on github pages or try to minimize the build size first (usually will affect the performance) ok so ive read your code and youre trying to use wasm as your server i dont think i can help you with that another way (but painfully slow) is write a compression and decompression algorithm basically push the compressed file and decompress it when running the server
Ddiversable12/22/2023
yeah, this is an app that's built using the fullstack Rust framework Leptos (see https://leptos.dev) I'm trying to set up a template for all Leptos devs to use in the future (I'm writing/updating the Leptos book) - so yeah, we're gonna need to up the standard deployment size for that to work. Do you know who I'd need to talk to make this happen?
Ffyrfnn12/22/2023
maybe talk to one of the core members? im sure they can sort this out
Ddiversable12/22/2023
good to know - thank you very much for your help!! Happy Holidays!

Looking for more? Join the community!

Recommended Posts
Get only the first records with deno kv but reversed orderedI'm using Deno KV to store articles. Generating the ID for the articles: ``` export function generaerror: Uncaught (in promise) SyntaxError: Invalid regular expression flagsAfter Updating my fresh to latest version I got following error ``` deno task start Task start deno third party module repo changeI'm the author of a third party deno module: https://deno.land/x/streamdal_protos@v0.0.126. My comDeno.serve get full path instead of only params and urlI need to get params from an url like this `http://localhost:8000/auth#token_type=Bearer&access_tokeSend custom response inside error event listenerIf I add an event listener for errors in Deno to catch anything my middleware error handler doesn't,assertThrows() limitationsassertThrows() seems to only filter on class name and message. Is there an assert function for checkLSP/VSCode stops workingI'm having issues in my fresh project time to time it stops working and I have to restart it or vscoCan the listeners for messages from Deno Deploy Queues timeout?Can the listeners for messages from Deno Deploy Queues timeout like Vercel serverless functions? AreHow to get the path to the compiled binary?`import.meta.url` and `Deno.mainModule` are used to get the current script, but after a binary is crHow to get `require.main.filename` like Node as DenoI am making a module to be published on deno.land/x. I want the user to put a file describing the coChange Web Worker Permissions after the Worker StartedHello, I was wondering if it is possible to change/update the permissions of a web worker after it Missing transpiled source codeI'm trying to generate coverage for my project and I'm getting the following: ``` deno task coverageTrouble validating a requestHi there! I'm trying to validate a Discord HTTP request, but I don't know how to do it (https://discHow to deploy to Deno Deploy from a Github repository's subdirectory?I read somewhere that you can deploy from a subdirectory, but I can't find any documentation on how Convert to exeI have made my Javascript program into an exe with deno: https://docs.deno.com/runtime/manual/tools/Manual deployment promotion + long lived preview deploymentsHello! I am working on a deployment pipeline and have a few questions: 1. Is there a way to promoteIs there a way to get deno coverage information in a vscode lens?If I run my tests with coverage enabled, can I get some visual feedback in vscode?Performance QuestionI have a Deno application, which creates API endpoint, and uses mongodb. Now I want to host this on Is there a way to get a server's SSL certificate's public information with Deno?This is available in Node with `getPeerCertificate()` but not in Deno's Node compatibility layer - iInvalidData: No certificates found in cert fileHello! Following up from a previous help post here, https://discord.com/channels/684898665143206084/