From d1b1f58f00e7019365be3b040836cfddee3f8448 Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Sun, 4 Oct 2026 20:42:57 +0100 Subject: [PATCH] Fix broken manifest path resolution (#1047) --- packages/controller/src/Controller.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/controller/src/Controller.ts b/packages/controller/src/Controller.ts index d3b09b3a..7d60f6b3 100644 --- a/packages/controller/src/Controller.ts +++ b/packages/controller/src/Controller.ts @@ -842,7 +842,7 @@ export default class Controller { try { manifest = JSON.parse(await fs.readFile(filePath, { encoding: "utf8" })); } catch (err: any) { - if (!throwOnMissing && err.code !== "ENOENT") { + if (throwOnMissing && err.code !== "ENOENT") { throw err; } } @@ -1132,8 +1132,9 @@ export default class Controller { const context = { metrics, logger, controller: this }; for (let pluginInfo of this.pluginInfos) { try { - let manifestPath = path.posix.join(pluginInfo.requirePath, "dist", "web", "manifest.json"); - pluginInfo.manifest = await Controller.loadJsonObject(import.meta.resolve(manifestPath), true); + const manifestPath = path.posix.join(pluginInfo.requirePath, "dist", "web", "manifest.json"); + const resolvedManifestPath = fileURLToPath(import.meta.resolve(manifestPath)); + pluginInfo.manifest = await Controller.loadJsonObject(resolvedManifestPath, true); } catch (err) { if (lib.pluginNeedsWebBuild(pluginInfo)) { logger.warn(`Unable to load dist/web/manifest.json for plugin ${pluginInfo.name}`);