Skip to content

every example app boots with an ERROR-level block for @objectstack/service-i18n, a service none of them declares — the message itself says it is not a failure #15185

Description

@hotlong

Measured (showcase on main, 2026-09-04, objectstack dev)

Every boot of examples/app-showcase prints, at error level:

[i18n] @objectstack/service-i18n was requested but could not be loaded (undeclared).
  Unchanged: this boot serves i18n from the kernel in-memory fallback, so what follows
  is why the file-based service is absent — not a boot failure.
Cannot find package '@objectstack/service-i18n': the host app does not declare it.

followed by ~12 more lines of remediation and the #4719 rationale.

The message is right about the mechanism and right to refuse mere reachability. What is off is the register and the population:

  • The three shipped examples — app-showcase, app-crm, app-todo — declare none of it (grep i18n over their package.json dependencies returns nothing), while app-showcase does declare translations: [ShowcaseTranslationBundle] and an i18n config block. So the flagship example asks for i18n in metadata and cannot get the service by construction.
  • The fallback works: zh-CN / en switching was verified in the browser this same session, so nothing a user does is broken.
  • Yet it prints at error, on every boot, in the example a new user runs first — and it is the only error-level output on an otherwise clean boot.

Two readings, both cheap; pick one

  1. The examples should declare it — add @objectstack/service-i18n to the three example apps' dependencies, so the file-based service loads and the block disappears. This is the reading the message itself prescribes.
  2. The level is wrong for this case — an app that never declared the service is on the intended fallback path, so warn (or info) fits and error should stay for an app that DID declare it and still failed to load. The message already distinguishes the two states in prose; the level does not.

They are not exclusive: (1) for the examples, (2) so the next undeclared host does not read a working boot as broken.

Found during the release-readiness browser round for the objectui pin refresh (#14511 / PR #15183). Not a regression from that PR — measured on main as of 5cf1c881b.

Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions