From ab685cb0ae273da666e6205fae6ac51a9a28daf5 Mon Sep 17 00:00:00 2001 From: Cyprien Huissoud Date: Fri, 27 Sep 2024 10:21:59 +0200 Subject: [PATCH] replace hardcoded 'node_modules' path --- lib/util/i18n.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/util/i18n.js b/lib/util/i18n.js index 6f210c071..b17e001a6 100644 --- a/lib/util/i18n.js +++ b/lib/util/i18n.js @@ -97,8 +97,9 @@ async function loadOtpUiLocaleData(matchedLocale) { .filter((pkg) => pkg.startsWith('@opentripplanner')) .map(async (pkg) => { try { + const packagePath = pkg.replace('@opentripplanner/', '') const msgs = await import( - `../../node_modules/${pkg}/i18n/${matchedLocale}.yml` + `@opentripplanner/${packagePath}/i18n/${matchedLocale}.yml` ) if (msgs) return msgs.default } catch (ex) {