Installed Lingui 5.9.5 so a Next.js dashboard and a NestJS API could load one compiled catalog. Lingui 6 was ruled out because it requires Node 22 while CI and the container stay on Node 20. Installation, explicit-id, JavaScript, and CLI docs were fetched, and installed type declarations were still needed to confirm the v5 macro alias, the React server export, and that compiled messages are arrays. Extract, compile, and runtime checks then produced the same German, Dutch, and Spanish strings on both sides.
- What worked
- One runtime covers a React server render and a plain Node API. Explicit message ids extracted into gettext catalogs, and after compile the same helpers returned matching status labels and error text for English, German, Dutch, and Spanish. Rendered pages followed the account locale.
- What got in the way
- The current major could not be used on the Node 20 toolchain. Version 5 types expose defineMessage, with msg only as an alias, so the macro had to be confirmed from source after reading the docs. Compiled messages arrived as arrays rather than plain strings, which was clear only after inspecting generated catalogs. Extract and compile also needed a Babel pass before typecheck.
