Skip to content

TypeScript build fails on clean Node 22 install with Graphology and Transformers errors #12

Description

@gtrafael

Bug description

At upstream commit 1d2481ece87807f2f695b8853a790b8c8aa62b29, a clean Node 22 install cannot compile the project. The failures are in the Graphology import/type boundary, the Transformers pipeline overload, and a conflicting declaration shipped by Transformers. This report intentionally excludes the separately tracked Zod schema failure (#2, #7, and PR #4).

Steps to reproduce

  1. Check out commit 1d2481ece87807f2f695b8853a790b8c8aa62b29.
  2. Run in the official Node 22 image:
docker run --rm -v "$PWD:/src:ro" -w /work node:22-slim sh -c 'cp /src/package.json /src/package-lock.json /src/tsconfig.json . && cp -R /src/src . && npm ci && npm run build'\n```\n\n## Expected behavior\n\n`npm run build` completes and produces `dist/`.\n\n## Actual behavior\n\nTypeScript exits non-zero. Representative errors:\n\n```text\nnode_modules/@huggingface/transformers/types/models/mgp_str/processing_mgp_str.d.ts(52,5): error TS2416: Property 'batch_decode' in type 'MgpstrProcessor' is not assignable to the same property in base type 'Processor'.\nsrc/lib/embedder.ts(9,28): error TS2590: Expression produces a union type that is too complex to represent.\nsrc/lib/graph.ts(12,26): error TS2709: Cannot use namespace 'Graph' as a type.\nsrc/lib/graph.ts(16,25): error TS2351: This expression is not constructable.\nsrc/lib/graph.ts(32,14): error TS2349: This expression is not callable.\n```\n\nThe Graphology errors repeat for constructor usage, Louvain, PageRank, and betweenness centrality, with resulting implicit-`any` and `unknown` errors.\n\n## Environment\n\n- Linux container: `node:22-slim`\n- Node: 22.x\n- npm: 10.x\n- TypeScript: 5.9.3 from the lockfile\n- Upstream commit: `1d2481ece87807f2f695b8853a790b8c8aa62b29`\n\n## Additional context\n\nA minimal fix is being validated in the `gtrafael/knowledge-graph-autolic` fork. It limits changes to TypeScript interop/type boundaries and does not propose Docker runtime or model-cache changes as part of this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions