Bug
[email protected] was published to npm without the quality/ directory in the
tarball payload. The CLI eagerly imports from it via commands/metrics/*, so the
entire CLI fails on boot with MODULE_NOT_FOUND — not just the metrics
subcommand.
Repro (clean install)
mkdir test-aiox && cd test-aiox
npm pack [email protected]
tar -tzf aiox-core-5.2.9.tgz | grep "quality/" || echo "❌ quality/ missing from tarball"
Error
Error: Cannot find module '../../../quality/metrics-collector'
Require stack:
- .aiox-core/cli/commands/metrics/record.js
- .aiox-core/cli/commands/metrics/index.js
- .aiox-core/cli/index.js
at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
...
code: 'MODULE_NOT_FOUND'
Affected files (4)
All four eagerly require from ../../../quality/:
| File |
Imports |
cli/commands/metrics/record.js:12 |
MetricsCollector from quality/metrics-collector |
cli/commands/metrics/show.js:12 |
MetricsCollector from quality/metrics-collector |
cli/commands/metrics/cleanup.js:12 |
MetricsCollector from quality/metrics-collector |
cli/commands/metrics/seed.js:12,44 |
seedMetrics, generateSeedData from quality/seed-metrics |
And the eager registration in cli/index.js:
```js
const { createMetricsCommand } = require('./commands/metrics');
// ...
program.addCommand(createMetricsCommand());
```
means any invocation — `aiox --help`, `aiox qa run`, `aiox info`, anything — explodes.
Impact
Every subcommand (`workers`, `manifest`, `qa`, `mcp`, `migrate`, `generate`,
`config`, `pro`, …) is blocked on boot, not just `metrics`. Fresh installs of
v5.2.9 have an unusable CLI.
Likely cause
`quality/` was probably gitignored or excluded from the `files` field in the
package's `package.json` during the 3.11a release. Reference: commit headers
say "Story 3.11a - Quality Gates Metrics Collector".
Suggested fixes (any of)
- Include `quality/` in the published payload (verify `files` field or
`.npmignore`).
- Make `cli/commands/metrics` imports lazy so the CLI degrades gracefully
when `quality/` is absent (only the `metrics` subcommand would fail).
- Move `MetricsCollector` and `seed-metrics` into the published tree
(e.g., under `core/quality/`).
Local workaround applied
Created honest stubs at `.aiox-core/quality/metrics-collector.js` and
`.aiox-core/quality/seed-metrics.js` that throw an explicit error if any
`metrics` subcommand is invoked. CLI now boots; other subcommands functional.
Environment
- aiox-core: 5.2.9 (npm)
- node: 22.21.0
- npm: 10.9.4
- OS: macOS (darwin 25.5.0)
Bug
[email protected]was published to npm without thequality/directory in thetarball payload. The CLI eagerly imports from it via
commands/metrics/*, so theentire CLI fails on boot with
MODULE_NOT_FOUND— not just themetricssubcommand.
Repro (clean install)
Error
Affected files (4)
All four eagerly require from
../../../quality/:cli/commands/metrics/record.js:12MetricsCollectorfromquality/metrics-collectorcli/commands/metrics/show.js:12MetricsCollectorfromquality/metrics-collectorcli/commands/metrics/cleanup.js:12MetricsCollectorfromquality/metrics-collectorcli/commands/metrics/seed.js:12,44seedMetrics,generateSeedDatafromquality/seed-metricsAnd the eager registration in
cli/index.js:```js
const { createMetricsCommand } = require('./commands/metrics');
// ...
program.addCommand(createMetricsCommand());
```
means any invocation — `aiox --help`, `aiox qa run`, `aiox info`, anything — explodes.
Impact
Every subcommand (`workers`, `manifest`, `qa`, `mcp`, `migrate`, `generate`,
`config`, `pro`, …) is blocked on boot, not just `metrics`. Fresh installs of
v5.2.9 have an unusable CLI.
Likely cause
`quality/` was probably gitignored or excluded from the `files` field in the
package's `package.json` during the 3.11a release. Reference: commit headers
say "Story 3.11a - Quality Gates Metrics Collector".
Suggested fixes (any of)
`.npmignore`).
when `quality/` is absent (only the `metrics` subcommand would fail).
(e.g., under `core/quality/`).
Local workaround applied
Created honest stubs at `.aiox-core/quality/metrics-collector.js` and
`.aiox-core/quality/seed-metrics.js` that throw an explicit error if any
`metrics` subcommand is invoked. CLI now boots; other subcommands functional.
Environment