Summary
The npm-published qcobjects@2.5.142 package ships incomplete/broken TypeScript type declarations. A project importing the framework (import { Package, Controller, Component, New, ... } from "qcobjects") fails tsc with TS2305: Module '"qcobjects"' has no exported member '...' for essentially every named export, so any TypeScript build of the official qcobjectsnewapp template is blocked.
Environment
qcobjects@2.5.142 (latest) via npm
- Node v24.18.1, npm 11.12.1, TypeScript 5.7.2
moduleResolution: nodenext (per the official qcobjects-tsconfig base)
Repro
Any TS file that does a named import from the package:
import { Package, Controller, Component, New, ClassFactory, logger } from "qcobjects";
Run:
npx tsc --noEmit --module nodenext --moduleResolution nodenext --target es2021 --lib es2021,dom --esModuleInterop src/app.ts
Result:
src/app.ts(2,10): error TS2305: Module '"qcobjects"' has no exported member 'Package'.
src/app.ts(2,19): error TS2305: Module '"qcobjects"' has no exported member 'Controller'.
src/app.ts(2,31): error TS2305: Module '"qcobjects"' has no exported member 'Component'.
src/app.ts(2,42): error TS2305: Module '"qcobjects"' has no exported member 'New'.
src/app.ts(2,47): error TS2305: Module '"qcobjects"' has no exported member 'ClassFactory'.
src/app.ts(2,61): error TS2305: Module '"qcobjects"' has no exported member 'logger'.
Root cause
--traceResolution shows the package resolves correctly to node_modules/qcobjects/public/types/index.d.ts. However, that single rolled-up declaration file imports/re-exports from bare, unqualified module specifiers that do not exist in the package:
export { Package } from "Package"
export { New } from "New"
export { ClassFactory } from "ClassFactory"
export { Controller } from "Controller"
export { logger } from "Logger"
import ... from "ObjectName", from "getType", from "Export", from "is_raw_class", from "platform", ...
The package ships only one type file:
node_modules/qcobjects/public/types/index.d.ts
There are no Package.d.ts, ObjectName.d.ts, etc. anywhere under the package (verified via find node_modules/qcobjects -name "*.d.ts"). Because these internal specifiers cannot be resolved, every re-exported symbol is dropped, producing the TS2305 errors.
Expected behavior
import { Package, Controller, Component, New, ... } from "qcobjects" should type-check and resolve to the exported framework API, so the official qcobjectsnewapp template's npm run build / npm start (which run tsc via build:ts) can complete.
Notes
Summary
The npm-published
qcobjects@2.5.142package ships incomplete/broken TypeScript type declarations. A project importing the framework (import { Package, Controller, Component, New, ... } from "qcobjects") failstscwithTS2305: Module '"qcobjects"' has no exported member '...'for essentially every named export, so any TypeScript build of the officialqcobjectsnewapptemplate is blocked.Environment
qcobjects@2.5.142(latest) via npmmoduleResolution: nodenext(per the officialqcobjects-tsconfigbase)Repro
Any TS file that does a named import from the package:
Run:
Result:
Root cause
--traceResolutionshows the package resolves correctly tonode_modules/qcobjects/public/types/index.d.ts. However, that single rolled-up declaration file imports/re-exports from bare, unqualified module specifiers that do not exist in the package:export { Package } from "Package"export { New } from "New"export { ClassFactory } from "ClassFactory"export { Controller } from "Controller"export { logger } from "Logger"import ... from "ObjectName",from "getType",from "Export",from "is_raw_class",from "platform", ...The package ships only one type file:
There are no
Package.d.ts,ObjectName.d.ts, etc. anywhere under the package (verified viafind node_modules/qcobjects -name "*.d.ts"). Because these internal specifiers cannot be resolved, every re-exported symbol is dropped, producing theTS2305errors.Expected behavior
import { Package, Controller, Component, New, ... } from "qcobjects"should type-check and resolve to the exported framework API, so the officialqcobjectsnewapptemplate'snpm run build/npm start(which runtscviabuild:ts) can complete.Notes
require("qcobjects")exposesClass,Package,New,Componentas functions. Only the shipped TypeScript declarations are broken.spec/testsSpec.js) also fails against 2.5 (expects 2.4-era globals), and issue Shipped browser builds embed Node core built-ins (node:fs, node:process), so neither <script> nor <script type="module"> loads in a browser #118 covers the separate browser-bundle (node:fs/node:process) problem.