Skip to content

JavaScript heap out of memory #503

@arkhaiel

Description

@arkhaiel
- Operating System: `Darwin`
- Node Version:     `v23.10.0`
- Nuxt Version:     `3.16.0`
- CLI Version:      `3.23.1`
- Nitro Version:    `2.11.7`
- Package Manager:  `pnpm@10.4.1`
- Builder:          `-`
- User Config:      `modules`, `$development`, `devtools`, `app`, `css`, `content`, `runtimeConfig`, `devServer`, `future`, `compatibilityDate`, `hub`, `vite`, `eslint`, `icon`
- Runtime Modules:  `@nuxthub/core@0.8.18`, `@nuxt/ui-pro@3.0.0`, `@nuxt/content@3.3.0`, `@nuxtjs/mdc@0.15.0`, `nuxt-auth-utils@0.5.16`, `@pinia/nuxt@0.10.1`, `@nuxt/scripts@0.11.2`, `@nuxt/icon@1.11.0`, `@nuxt/eslint@1.2.0`
- Build Modules:    `-`

Describe the bug
Hi, for no obvious reason I ran into an error during npx nuxthub deploy telling me "JavaScript heap out of memory", which stops the build.
The origin of this error is concerning, but right now I just need to be able to keep deploying my app.
Exporting the NODE_OPTIONS='--max-old-space-size=4096' env variable in the terminal doesn't help.
I've been able to build my app by updating my package.json with the line :

    "build": "NODE_OPTIONS='--max-old-space-size=4096' nuxt build",

The problem is running npx nuxthub deploy doesn't call pnpm build so I still can't deploy from my computer. It's been a good reason to setting up github actions, and I'm now able to deploy through github actions, which works well.

Note I'm able to build my app by running pnpm build.

How can I keep deploying through the nuxthub cli with this JS heap out of memory problem ?

Now github actions can help me with the need to be able to keep deploying, I'd like to understand what's going on. Have you an idea about the origin of the JS heap out of memory problem ? How can I trace the error ?

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions