Skip to content

@qvac/sdk 0.15.0: model constants fail to typecheck under moduleResolution nodenext (runtime OK) #3323

Description

@patilswapnilv

SDK version: @qvac/sdk 0.15.0 · Runtime: Node 24.x · OS: macOS Darwin arm64

Summary: Bundled model constants (e.g. LLAMA_3_2_1B_INST_Q4_0) exist at runtime but tsc reports TS2305 under moduleResolution: "nodenext".

Steps to reproduce:

  1. Fresh package with "type": "module" and @qvac/sdk@0.15.0.
  2. tsconfig.json:
    {
      "compilerOptions": {
        "module": "nodenext",
        "moduleResolution": "nodenext",
        "strict": true,
        "skipLibCheck": true,
        "noEmit": true
      }
    }
  3. Typecheck:
    import { LLAMA_3_2_1B_INST_Q4_0 } from "@qvac/sdk"; // TS2305
  4. Runtime (same install) succeeds:
    node --input-type=module -e "import('@qvac/sdk/models').then(m => \
      console.log('LLAMA_3_2_1B_INST_Q4_0' in m))"
    # -> true  (448 exports present)

Same failure for @qvac/sdk/models and other constants (GTE_LARGE_FP16, BCI_EMBEDDER, …).

Expected: Constants type-resolve the way docs/JSDoc show the import.

Actual:

error TS2305: Module '"@qvac/sdk"' has no exported member 'LLAMA_3_2_1B_INST_Q4_0'.

Runtime still works.

Likely cause: The registry barrel re-exports via extensionless export * from './models' in the shipped .d.ts. nodenext ESM type resolution does not follow that; moduleResolution: "bundler" does (and matches tsx/esbuild at runtime).

Suggested fix / workaround:

  • Fix: Ship .d.ts re-exports with explicit .js extensions (or a types entry nodenext can follow) so Node-ESM projects typecheck out of the box.
  • Workaround: Use moduleResolution: "bundler" (what qvac-cookbook uses in tsconfig.base.json).

Context: Hit this while building recipe 01 (completion streaming) for qvac-cookbook. Highest-signal types/runtime gap found while consuming the SDK as a Node-ESM TypeScript app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions