Skip to content

v5.0.5 — Fix zod dedup: Class extends value undefined in V8 isolate

Choose a tag to compare

@renatomarinho renatomarinho released this 01 Aug 09:15
· 3 commits to main since this release

Fixed — V8 Isolate \Class extends value undefined is not a constructor or null\

@mcpfusion/core\ — \deploy.ts\ zod deduplication

  • **\�dgeStubPlugin()**: Now deduplicates \zod\ imports in the esbuild bundle. MCPs often declare \zod ^3.x\ in devDependencies while @mcpfusion/core\ and @modelcontextprotocol/server\ require \zod ^4.x. When esbuild bundles both versions, \class ZodString extends ZodType\ from v3 can resolve \ZodType\ from v4 (or vice-versa), causing \Class extends value undefined is not a constructor or null\ at runtime in the V8 isolate.
  • Fix: \onResolve\ for ^zod(\/.*)?$\ now resolves all zod imports to a single copy — preferring the version in the MCP's
    ode_modules/zod, then @mcpfusion/core's nested zod, then @modelcontextprotocol/server's nested zod.
  • **\�dgeStubPlugin(cwd)**: Now accepts \cwd\ parameter to resolve zod from the MCP's working directory.

Full Changelog: v5.0.4...v5.0.5