{"record":{"id":"77687cf6cbf5b446","repo":"k1tbyte/Wand-Enhancer","slug":"enhancer-remote-renderer-script-artifacts-are-mi","errorCode":null,"errorMessage":"[ENHANCER] Remote renderer script artifacts are missing. Run `cd web-panel && pnpm run build` before patching.","messagePattern":"\\[ENHANCER\\] Remote renderer script artifacts are missing\\. Run `cd web-panel && pnpm run build` before patching\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"WandEnhancer/Core/Enhancer.cs","lineNumber":412,"sourceCode":"                Directory.Delete(targetRoot, true);\n            }\n\n            if (CopyEmbeddedDirectory(EmbeddedRemotePanelDistPrefix, targetRoot) == 0)\n            {\n                CopyDirectory(FindWorkspacePath(WebPanelDirectoryName, WebPanelDistDirectoryName), targetRoot);\n            }\n\n            if (!File.Exists(targetBridgePath))\n            {\n                throw new FileNotFoundException(\"[ENHANCER] Remote bridge artifact is missing. Run `cd web-panel && pnpm run build` before patching.\", targetBridgePath);\n            }\n\n            int defaultScriptCount = Directory.Exists(targetScriptsRoot)\n                ? Directory.GetFiles(targetScriptsRoot, JavaScriptFileSearchPattern, SearchOption.TopDirectoryOnly).Length\n                : 0;\n            if (defaultScriptCount == 0)\n            {\n                throw new FileNotFoundException(\"[ENHANCER] Remote renderer script artifacts are missing. Run `cd web-panel && pnpm run build` before patching.\", targetScriptsRoot);\n            }\n\n            int selectedScriptCount = CopySelectedJavaScriptFiles(_config.CustomScriptPaths, targetScriptsRoot);\n            int localScriptCount = CopyJavaScriptFiles(localCustomScriptsRoot, targetScriptsRoot);\n\n            _logger($\"[ENHANCER] Injected remote panel assets and renderer scripts into app.asar (default: {defaultScriptCount}, selected: {selectedScriptCount}, local: {localScriptCount})\", ELogType.Info);\n        }\n\n        private void AttachProxyDll()\n        {\n            var assembly = Assembly.GetExecutingAssembly();\n            var dll = assembly.GetManifestResourceStream(Constants.ProxyDllResouceName);\n            if (dll == null)\n            {\n                throw new Exception(\"[ENHANCER] Proxy DLL resource not found\");\n            }\n            var destPath = Path.Combine(_weModConfig.RootDirectory, \"version.dll\");\n            using (var fileStream = File.Create(destPath))","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/k1tbyte/Wand-Enhancer/blob/643c8f8b62cbb26fd3ac105b92497d9a9c445f08/WandEnhancer/Core/Enhancer.cs#L394-L430","documentation":"After the bridge.cjs check, the renderer-scripts directory (<_unpackedPath>/remote-panel/renderer-scripts) must contain at least one top-level .js file. Zero files means the default renderer-script build step — build:bridge bundles scripts/default/*.js into dist/renderer-scripts — did not run or produced nothing.","triggerScenarios":"InjectRemotePanelFiles at Enhancer.cs:407-413: Directory.GetFiles(targetScriptsRoot, \"*.js\", TopDirectoryOnly).Length == 0 (or targetScriptsRoot does not exist).","commonSituations":"build:bridge step skipped or failed; web-panel/bridge/scripts/default/ is empty in source; output directory misconfigured in the build script; an interrupted build left dist partially populated (bridge.cjs present but no scripts).","solutions":["Run `cd web-panel && pnpm run build` end-to-end.","Verify web-panel/dist/renderer-scripts/*.js exist (e.g. remote-popup-cleanup.js, installed-apps-sync.js per AGENTS.md) and `node --check` passes on each.","Check the build:bridge script in web-panel/package.json bundles scripts/default/ into dist/renderer-scripts.","Re-run the patch after a clean build."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm renderer scripts are present before patching\nstring scriptsDir = Path.Combine(repoRoot, \"web-panel\", \"dist\", \"renderer-scripts\");\nint count = Directory.Exists(scriptsDir)\n    ? Directory.GetFiles(scriptsDir, \"*.js\", SearchOption.TopDirectoryOnly).Length : 0;\nif (count == 0)\n    throw new InvalidOperationException(\"No renderer scripts in dist/renderer-scripts; run `cd web-panel && pnpm run build`.\");","typeGuard":null,"tryCatchPattern":"try { enhancer.Patch(); }\ncatch (FileNotFoundException ex) when (ex.Message.Contains(\"Remote renderer script artifacts are missing\")) {\n    // run pnpm build (build:bridge step), then re-patch\n}","preventionTips":["Assert dist/renderer-scripts/*.js exists in CI before packaging.","Run `node --check` on each generated script in CI.","Keep build:bridge as a dependency of the C# build target."],"tags":["build","web-panel","renderer-scripts","remote-panel"],"backgroundTag":null,"analyzedSha":"643c8f8b62cbb26fd3ac105b92497d9a9c445f08","analyzedAt":"2026-08-13T14:17:43.823Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}