Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

bug(ui): child core UIs that don't import the i18n runtime ship no @lingui/* share-scope entries — host auth plugin fails SSR composition with RUNTIME-012

クローズ
#496 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #614 @elliotBraem による — マージ済み

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
react, typescript

調査の方向性

Start by reading the shared-deps spec at every-plugin/shared-deps-spec and the platform UI's ui/src/i18n/catalogs.ts, ui/src/i18n/runtime.tsx, and __root.tsx pattern. Compare those with the generated stubs and child UI build manifests described in the report to choose where the missing provider should be supplied. Done means a child core UI without its own i18n imports can compose the auth plugin during SSR without RUNTIME-012; the issue leaves the implementation choice open.

索引モデルが issue の本文から書いたものです。

説明

bug needs-triage
Summary

A child app that overrides app.ui with its own core UI replaces the platform's UI as the core-ui provider in its federation graph — but it only emits shared-scope entries for UI deps it actually imports. The platform's auth plugin (pinned child-side via the extends chain) consumes shared @lingui/core, @lingui/react, and everything-dev/ui/i18n with import: false (consumer role per every-plugin/shared-deps-spec UI_SHARED_DEPS). A child UI authored before the i18n adoption never imports everything-dev/ui/i18n at runtime (e.g. appLocale is only read via type imports / passed to createServerRouterModule, which uses it for cookie/Accept-Language negotiation only) — so the child's bundles ship no @lingui/* share-scope entries, and boot fails:

Boot SSR composition FAILED — health stays degraded: UnknownError
(cause: Error: The getter for the shared module is not a function. This may be
caused by setting "shared.import: false" without the host providing the
corresponding lib. #RUNTIME-012
args: {"shareKey":"@lingui/core"})

The failure only surfaces at runtime, on every boot, and pins the child's health to degraded even when the api and all other plugins load.

Evidence (manifests fetched from the CDN)
  • Parent platform's own UI (gitSha b63f0b5, the canonical core-ui provider) shares the full UI dep set: @lingui/core 5.9.0, @lingui/react 5.9.0, everything-dev/ui/i18n 2.0.0-rc.12, plus react/react-dom/@tanstack/@orpc.
  • Child UI built with every-plugin 3.0.0-rc.8 + everything-dev 2.0.0-rc.12 shares react, react-dom, @tanstack/*, @orpc/*, everything-dev/ui/auth — no @lingui/*, no everything-dev/ui/i18n (web and ssr manifests identical).
  • The pinned auth bundle's chunks request shareKey: "@lingui/core" / "@lingui/react"; the parent's host bundle's mf-manifest lists only the core shared deps (no UI deps), so nothing else in the graph can satisfy the request.

The parent's own app wires the canonical seam: app-owned ui/src/i18n/catalogs.ts + ui/src/i18n/runtime.tsx (createLocaleRuntime → AppI18nProvider), mounted in the root route (__root.tsx imports @/i18n/runtime). Child apps scaffolded before that pattern existed don't have it, and neither init/sync nor the build flags the gap.

Fix options (maintainer's pick)
  1. Scaffold the seam in init/sync: write ui/src/i18n/{catalogs,runtime}.tsx (derived from the app's appLocale bootstrap export) and mount AppI18nProvider in the root route — matches the canonical pattern, keeps the strict-singleton version checks meaningful.
  2. Emit the full UI_SHARED_DEPS in the core-ui build regardless of imports, so the share scope is always complete — and/or fail the build when a UI_SHARED_DEPS entry has no provider in the graph (build-time failure instead of runtime boot failure).
  3. Wire the provider in the generated stubs (entry.gen.ts/router.server.gen.tsx already read appLocale), so the framework owns the mount.
Local mitigation

The affected child app added an i18n-seam check + maintenance step to its scripts/v2-upgrade/ (pnpm i18n-seam): detects "appLocale declared but no runtime everything-dev/ui/i18n import / provider unmounted", scaffolds the canonical seam, and mounts the provider.

主要言語
TypeScript
スター
5
フォーク
3
平均マージ
9時間 48分
マージ済み PR(30日)
152

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NEARBuilders/everything-dev のほかの issue

NEARBuilders/everything-dev の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。