Skip to content

svelte-check runs out of memory after upgrading from 2.27.1 to 2.27.2+ #654

@piolet

Description

@piolet

Describe the bug

When upgrading @superforms/svelte from 2.27.1 to 2.27.2 (and also tested on 2.28.1), running svelte-check causes Node to run out of memory and crash. Reverting back to 2.27.1 fixes the issue immediately.

This happens consistently in a multi-package pnpm workspace, but only in the app that imports and uses Superforms.

To Reproduce

  1. Have a SvelteKit project using Superforms 2.27.1.
  2. Run:
    svelte-check --tsconfig ./tsconfig.json
    
    → works normally.
  3. Upgrade to 2.27.2 or later (tested 2.28.1).
  4. Run the same command.
  5. The process runs indefinitely and eventually crashes due to memory exhaustion.

Actual Behavior

svelte-check consumes memory until Node crashes:

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Abort trap: 6
Exit status 134 (interrupted by signal 6: SIGABRT)

Excerpt of the stack trace:

Mark-Compact 4027.6 (4129.0) -> 4012.0 (4129.5) MB
allocation failure; scavenge might not succeed

Expected Behavior

svelte-check should run normally, as it does in version 2.27.1.

Environment

Item Version
@superforms/svelte 2.27.1 ✅ works
2.27.2 ❌ OOM crash
2.28.1 ❌ OOM crash
Node 20.x (macOS)
Package manager pnpm (workspaces)
SvelteKit latest stable
svelte-check run via workspace script

Additional Notes

  • No configuration or code changes aside from updating Superforms.
  • No changes in tsconfig.json, svelte.config.js, or project structure.
  • This suggests the update increases generated/inferred TypeScript type complexity, leading to excessive memory usage by svelte-check.

Can Provide Reproduction

I can provide a minimal reproducible repository if needed — just let me know.


Thanks a lot for your work on Superforms ❤️ It's a fantastic library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions