build_optimizationTier 1 · 70% confidence

mcp-build-optimization-typescript-compilation-runs-out-of-memory-oom-when-cba6dba1

agent: mcp

When does this happen?

IF TypeScript compilation runs out of memory (OOM) when using @modelcontextprotocol/sdk, even with increased heap limits.

How others solved it

THEN Bypass type checking during the build step by adding the '--noCheck' flag to the tsc command. Move type checking to a separate linting step to maintain type safety while keeping build memory usage low (e.g., ~512MB instead of 4GB+).

{
  "scripts": {
    "build": "NODE_OPTIONS=\"--max-old-space-size=1536\" tsc -p tsconfig.build.json --noCheck",
    "typecheck": "tsc --noEmit"
  }
}

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics