Summary
The QCObjects builds shipped in the current npm package (qcobjects@2.5.142) do not load in a plain browser. Loading the framework via a classic <script> tag — the method documented in the official ReadTheDocs/README "straight way into HTML5" guides — throws at load time, so CONFIG, Class, New, Component, etc. are never defined and the app does nothing. The ESM build also fails to initialize.
Additionally, the qcobjectsnewapp (2.4) quick-start template scaffolded with qcobjects-cli create <app> --pwa no longer builds or tests against the current qcobjects runtime.
Environment
qcobjects@2.5.142 (latest) installed via npm
qcobjectsnewapp@2.4.40-ts template (what qcobjects-cli create --pwa scaffolds)
- Node v24.18.1, npm 11.12.1
- Chromium headless (headless=new) for browser verification
Repro 1 — classic <script> fails to load any shipped browser bundle
Create a minimal page that loads the framework exactly as the docs show:
<!DOCTYPE html>
<html>
<head><title>demo</title></head>
<body>
<script type="text/javascript" src="js/QCObjects.js"></script>
<script type="text/javascript">
console.log(typeof CONFIG);
</script>
</body>
</html>
Point js/QCObjects.js at each build present in the package and observe in a browser console:
| File |
Result |
public/browser/QCObjects.js |
Uncaught Error: Dynamic require of "node:process" is not supported |
build/QCObjects.js (2.4 TS CommonJS) |
Uncaught ReferenceError: exports is not defined |
public/esm/index.mjs (via <script type="module">) |
module import hangs/never initializes; importing module body never runs |
In every case CONFIG is undefined and nothing executes.
Repro 2 — the scaffolded app does not build or test
Using the official CLI:
npm i -g qcobjects-cli
qcobjects create mynewapp --pwa
cd mynewapp
npm test # eslint passes; jasmine fails (expects 2.4-era globals: logger, __definition, _sdk_)
npx tsc --noEmit # TS2305 errors: qcobjects has no exported member 'CONFIG', 'Component', 'Package', ...
npm run publish:web # crashes at the first step (publish:static exits 1 with no output)
The template's TypeScript source targets 2.4-era globals/exports that no longer exist in the qcobjects@2.5.x types installed as its dependency.
Expected behavior
- One of the shipped builds should load via a plain
<script> tag (as the docs describe) and expose the global framework API (CONFIG, Class, New, Component, Import, ...).
- The official
qcobjectsnewapp template should build (npm run publish:web) and pass its own tests (npm test) with the version of qcobjects it declares as a dependency.
Notes
- The CDN build at
https://qcobjects.dev/QCObjects.js is the one documented to work, but that exact browser build is not what gets installed from npm — the npm package's own browser/ESM/2.4 builds all fail in a browser here.
- The
browser/QCObjects.js bundle (esbuild) references node:process, i.e. Node built-ins leaked into the browser bundle.
Impact
Any project scaffolded from the official template, or following the docs' "no transpiler, pure JavaScript" guidance with the npm package, does not run out of the box.
Summary
The QCObjects builds shipped in the current npm package (
qcobjects@2.5.142) do not load in a plain browser. Loading the framework via a classic<script>tag — the method documented in the official ReadTheDocs/README "straight way into HTML5" guides — throws at load time, soCONFIG,Class,New,Component, etc. are never defined and the app does nothing. The ESM build also fails to initialize.Additionally, the
qcobjectsnewapp(2.4) quick-start template scaffolded withqcobjects-cli create <app> --pwano longer builds or tests against the currentqcobjectsruntime.Environment
qcobjects@2.5.142(latest) installed via npmqcobjectsnewapp@2.4.40-tstemplate (whatqcobjects-cli create --pwascaffolds)Repro 1 — classic
<script>fails to load any shipped browser bundleCreate a minimal page that loads the framework exactly as the docs show:
Point
js/QCObjects.jsat each build present in the package and observe in a browser console:public/browser/QCObjects.jsUncaught Error: Dynamic require of "node:process" is not supportedbuild/QCObjects.js(2.4 TS CommonJS)Uncaught ReferenceError: exports is not definedpublic/esm/index.mjs(via<script type="module">)In every case
CONFIGisundefinedand nothing executes.Repro 2 — the scaffolded app does not build or test
Using the official CLI:
The template's TypeScript source targets 2.4-era globals/exports that no longer exist in the
qcobjects@2.5.xtypes installed as its dependency.Expected behavior
<script>tag (as the docs describe) and expose the global framework API (CONFIG,Class,New,Component,Import, ...).qcobjectsnewapptemplate should build (npm run publish:web) and pass its own tests (npm test) with the version ofqcobjectsit declares as a dependency.Notes
https://qcobjects.dev/QCObjects.jsis the one documented to work, but that exact browser build is not what gets installed from npm — the npm package's own browser/ESM/2.4 builds all fail in a browser here.browser/QCObjects.jsbundle (esbuild) referencesnode:process, i.e. Node built-ins leaked into the browser bundle.Impact
Any project scaffolded from the official template, or following the docs' "no transpiler, pure JavaScript" guidance with the npm package, does not run out of the box.