Skip to content

Vite Build Fails with "Out of Memory" #4

@ElvisAns

Description

@ElvisAns

This is a well known bug for many shared hosting.
Step to reproduce : Setup deployeur to deploy a project that has vite as the build tool : for instance : a laravel + inertia + vuejs project.
In the deploy process from your yaml file, npm run build will fail with the OOM error:

node:internal/deps/undici/undici:5829
      return await WebAssembly.instantiate(mod, {
                               ^

RangeError: WebAssembly.instantiate(): Out of memory: Cannot allocate Wasm memory for new instance
    at lazyllhttp (node:internal/deps/undici/undici:5829:32)

Vite Version: 5
Node.js 22
OS: Shared Hosting (cPanel) / Namecheap

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions