Repository navigation
Desktop app updates leave resources\runtime empty: plugin market cannot install or update plugins (pnpm.mjs MODULE_NOT_FOUND) #13492
Replies: 1 comment
|
Hi! Great investigation, especially comparing the installer contents before and after the update. Since manually restoring the runtime payload fixes plugin installation, this looks more like an updater packaging or resource preservation issue than a pnpm problem. One thing worth checking is whether the update process is supposed to preserve an existing runtime directory or replace it with a newly bundled payload. If the update package doesn't include the required runtime files, replacing the installation directory could leave the application with an incomplete runtime. I'd suggest adding a post-update validation step that checks for:
If validation fails, the updater should ideally restore the previous working runtime or report an actionable error before allowing plugin operations. It might also be useful to add an integration test that installs an older desktop build, performs an update, and verifies that plugin installation still works. Your verified workaround is valuable for affected users. The longer-term fix seems to belong in the update and runtime provisioning process. Thanks for documenting this! |
Uh oh!
There was an error while loading. Please reload this page.
Summary
After every desktop app update,
resources\runtimeis left as an empty directory, so the plugin market can neither install nor update any plugin (pnpm cannot be spawned).Environment
D:\sbdeepseekdesktop-runtime.json: node 24.21.0, pnpm 11.28.5, hostProtocolVersion 4https://download.deepseek.com/dsh-desk/feeds/win-x64/, channel nightlyCurrent behavior
.plugin-manager\logs\operation-*\pnpm.log(identical 811-byte file on every run):.dsh-market\log.ndjsonloops:update-start->update-rollback("failed update command and restoration of the previous build could not be verified") ->exit=1.Meanwhile
load_workspace_dependenciesfails withENOENT ...\runtime\primary-runtime\runtime.json, so Python/Node dependency paths are unusable too.Reproduction
dshmarket -> 1.73.19 exit=0on 2026-11-13 01:24).resources\runtimehas 0 files and every plugin update fails and rolls back.Evidence
resources453.5 MB,resources\runtimeempty; nopnpm.mjsanywhere under the install dir.app.asar199.3 MB andapp.asar.unpacked253.8 MB: the 405 MB runtime payload is not inside the update package.Root cause
dsh-desktop-host/lib/cli.jsrunDesktopCli()pins the plugin manager's package manager tojoin(supportDir, "primary-runtime", "dependencies", "pnpm", "bin", "pnpm.mjs");main.jsruntimeResources()derives the same path fromprocess.resourcesPath.runtime-tree.jsonly reads and validatesdesktop-runtime.json, andmain.jscontains no code that downloads or recreatesresources\runtime. The only installer logic,dsh-tool-workspace-dependenciesinstallPrimaryRuntime(source, root), copies from the bundled source tree - the very tree that is empty - so nothing can self-heal.Suggested fix
resources\runtimeduring update, or validate it and show a clear GUI error instead of a silent rollback.%USERPROFILE%\.dsh\dsh-runtimes\dsh-primary-runtime(payloadDigest0881fbf610a9a8ef344a9e650f3a4c1b7724260a74eeaefaa9ec31355907374f, node/pnpm/python versions match).pnpm, and surface a specific message instead ofMODULE_NOT_FOUND.Workaround (verified)
No restart needed (each plugin operation spawns a fresh pnpm). Afterwards
pnpm.mjs --version->11.28.5, python 3.12.14 works,load_workspace_dependenciesworks again.All reactions