Replies: 2 comments
|
manually install them with pnpm if you git cloned them from this repo, all these packages should be located inside the |
0 replies
|
clear your npx cache by "npx clear-npx-cache " |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Installing
@deepseek-ai/dshas a global pnpm package and runningdsh webfails to boot: the Cordis loader cannot resolve most plugin packages, producing a very long error dump.Environment
dsh0.1.0-rc.6 (installed viapnpm add -g @deepseek-ai/dsh@0.1.0-rc.6)To reproduce
Expected: boots and prints
dsh web: http://127.0.0.1:<port>.Actual: a long stack trace ending in
with a list of errors like:
…and similar for ~88 packages (126 packages needed by the
webprofile, only 59 resolvable).Root cause analysis
Two independent issues combine under pnpm's global (symlinked) install layout:
1.
healProfilesModuleFallbackcannot traverse the transitive dependency closurehealProfilesModuleFallbackindsh-app-bootmaintains the flat fallback dir$DSH_HOME/profiles/node_modules(one symlink per package in the app's dependency closure). It resolves each package withpackageDirFromAnchor, which usescreateRequire(anchor).resolve.paths(...)— a string-path probe that does not follow symlinks.Under pnpm's global layout,
dsh's direct dependencies resolve fine (they sit next to the app), but the transitive deps of bundle packages (e.g.dsh-web-app's deps likedsh-llm,dsh-session,dsh-host-webserver,dsh-typert-registry, …) live inside the pnpm content store and are not reachable from the symlink anchor, so the BFS silently drops them. Only ~59 direct deps get linked; the ~88 packages required by thewebprofile are missing from the fallback dir.2. Loader requires
--expose-internalsfor baseUrl-based plugin resolutioncordis-plugin-loader'simport()uses the internal Node ESM loader (which imports fromctx.baseUrl, i.e. the profile dir) only whenModuleLoader.fromInternal()succeeds, which requires the--expose-internalsflag on the node process. Otherwise it falls back to plain ESMimport()(external mode), which resolves relative to the loader's own location inside the pnpm store — where the plugin packages don't exist.The pnpm-generated bin shim for
dshdoes not pass--expose-internals, so even with all symlinks in place, plugin resolution still fails.Workaround (local, not a fix)
$DSH_HOME/profiles/node_modules/@deepseek-ai/(plus 2 hiddeninclude-referenced deps:dsh-host-directory-picker-native,dsh-client-ui-directory-picker-native), andnode --expose-internals.Suggested fixes
healProfilesModuleFallback/packageDirFromAnchor: resolve symlinks (realpath) before probing, so the transitive closure is found under pnpm's symlinked layouts.dshentrypoint always run with--expose-internals(shebang or shim), or make the loader's baseUrl-based (internal) import the default instead of an opt-in.This makes the tool unusable for the most common install path (
pnpm add -g), so it would be great to have it fixed before the stable release.All reactions