Fix DeepSeek Harness Deploy Errors: Deps, PATH & Builds
When a DeepSeek Harness deploy errors, classify it first: ERR_MODULE_NOT_FOUND and Cannot find package point to dependency resolution, dsh not found points to PATH, and ERR_PNPM_IGNORED_BUILDS points to build scripts. Match the error in the quick table below, then follow the corresponding item.
Overview: classify the deploy error first
DeepSeek Harness deploy errors almost all happen during dependency installation, and they fall into three classes: dependency resolution, command PATH, and build scripts. Based on a real walkthrough of deploy errors, the typical chain is: npx @deepseek-ai/dsh web fails to start → npm global or local install reports Cannot find package in bulk → switching to pnpm with --shamefully-hoist fixes resolution → ERR_PNPM_IGNORED_BUILDS blocks native modules → approve-builds allows the build scripts → npx dsh web finally starts on port 3080. Each error in this chain is one independent fix:
| Error | Most likely cause | Jump to |
|---|---|---|
ERR_MODULE_NOT_FOUND | npx temp cache misses peer deps | ERR_MODULE_NOT_FOUND |
Cannot find package '@deepseek-ai/dsh-xxx' | npm flat install cannot resolve the monorepo | Cannot find package (bulk missing) |
dsh command not found | global bin directory not on PATH | dsh: command not found |
ERR_PNPM_IGNORED_BUILDS | build scripts ignored by pnpm | ERR_PNPM_IGNORED_BUILDS |
Network timeout error (23) | unstable network (pnpm auto-retries) | Network timeout error 23 |
The official install command is npx @deepseek-ai/dsh web (source). Below, each class is one section, each error is one item written as error / cause / fix.
Class 1: Dependency resolution errors (ERR_MODULE_NOT_FOUND, Cannot find package)
This is the biggest bucket. The root cause is that
@deepseek-ai/dshis a monorepo: its plugin system references many standalone packages through peer dependencies, and npm's flat install strategy cannot resolve them — you must switch to pnpm.
ERR_MODULE_NOT_FOUND
- Error: running
npx @deepseek-ai/dsh web(source) fails withERR_MODULE_NOT_FOUND: Cannot find package '@deepseek-ai/cordis-plugin-group'. - Cause: the npx temp cache resolves dependencies incompletely and misses many peer dependencies.
- Fix: do not keep retrying npx — the problem is not the network, it is that npx's cache cannot pull in all peer deps. Clear the cache and reinstall dependencies locally with the pnpm flow in the next item.
Cannot find package (bulk missing)
- Error: after a local
npm install @deepseek-ai/dsh --legacy-peer-deps, startup reports a flood ofCannot find package '@deepseek-ai/dsh-xxx'(e.g. dsh-timeout, dsh-atomic-write), covering 50+ plugin packages. - Cause:
@deepseek-ai/dshis a monorepo whose plugin system references many packages via peer dependencies; npm's flat install cannot resolve this structure.--legacy-peer-depsonly skips peer conflict checks — it does not actually install peer dependencies, so packages are still missing. - Fix: remove the old dependencies and lockfile, then install with pnpm — pnpm handles workspaces and peer dependencies properly,
--shamefully-hoistemulates npm's flat structure, and--config.dedupe-peer-dependents=falseturns off deduplication (source):Ifbash# 1. Create a package.json in an empty directory (skip if you have one) npm init -y # 2. Clean the old dependencies (Windows: del package-lock.json + rmdir /s /q node_modules) rm -rf node_modules package-lock.json # 3. Install dsh with pnpm (the key flags) npx pnpm add @deepseek-ai/dsh --shamefully-hoist --config.dedupe-peer-dependents=falsepnpmitself is not found, always usenpx pnpminstead. This step downloads 500+ packages and takes a while.
Class 2: Command & PATH errors (dsh: command not found)
Dependencies are in place but the command will not start — usually a PATH problem. This class has two faces: the command does not exist, or it exists but packages are missing.
dsh: command not found
- Error: after
npm install -g @deepseek-ai/dsh, runningdsh websays the command is not found. - Cause: the npm global bin directory is not on PATH, so the shell cannot find the
dshexecutable. - Fix:
- Find the global bin directory with
npm prefix -gand add it to PATH (commonly%AppData%\npmon Windows,/usr/local/binon macOS/Linux). - Easier: skip global install. Install locally with pnpm and always start with
npx dsh web— npx picks updshfrom the localnode_modules/.bin.
- Find the global bin directory with
The endless missing-package loop
- Error: after fixing PATH,
dsh webstill reports missing packages likecordis-plugin-loader, and fixing one reveals another. - Cause: npm does not install peer dependencies automatically, and DSH depends on dozens of internal sub-packages, so manual installs never catch up.
- Fix: stop patching packages one by one. This is a dependency resolution problem — go back to the pnpm flow in Class 1 and reinstall once to pull in all peer dependencies.
Class 3: Build-script & network errors (ERR_PNPM_IGNORED_BUILDS, error 23)
After switching to pnpm, dependency resolution passes, but pnpm's security policy ignores build scripts for native modules by default, and an unstable network spams timeout warnings. Each has one standard fix.
ERR_PNPM_IGNORED_BUILDS
- Error: after pnpm install completes, it reports
[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: ... Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.(source). - Cause: pnpm's security policy does not run dependency build scripts by default, so native modules like node-pty and koffi never compile, and the app crashes at runtime.
- Fix: approve the build scripts and reinstall (source):
This time node-pty, koffi, and other native modules compile cleanly.bash
# 1. Approve build scripts: press a to select all, then confirm Yes npx pnpm approve-builds # 2. Reinstall to run those scripts npx pnpm install --shamefully-hoist --config.dedupe-peer-dependents=false
Network timeout error 23
- Error: the download spams
error (23)network timeout warnings. - Cause: an unstable network times out on some package downloads.
- Fix: nothing to do — pnpm retries automatically and eventually downloads everything (source). If it keeps failing after many retries, switch the npm registry to a mirror and run
npx pnpm installagain.
General debugging flow
Run any deploy error through this order — most problems are solved by the pnpm step.
- Classify the error → match it in the quick table: dependency resolution, PATH, or build scripts.
- Dependency resolution errors → clear node_modules and the lockfile, reinstall with pnpm and
--shamefully-hoist(the key step). - Command not found → check PATH with
npm prefix -g, or install locally and start withnpx dsh. - Build scripts ignored →
npx pnpm approve-builds, select all, thenpnpm install. - Verify startup →
npx dsh web; the terminal showshttp://localhost:3080and you are done. - Plugin support → once the deploy is up, if installing DSH plugins errors, use the DSH Plugin Hub plugin center for one-click installs and avoid git-source builds that ship no artifacts.
Notes
- Node.js 18 or newer — older versions fail to resolve dependency declarations.
- Always clean
node_modulesand the lockfile before switching package managers; never mix installs. --legacy-peer-depsonly skips peer checks — it does not save you from a monorepo's missing packages, so do not rely on it.- If pnpm is not found, use
npx pnpm; they are interchangeable. - Global install is optional — local pnpm install plus
npx dsh webis cleaner. error (23)retries automatically, so do not interrupt the install.- The web UI starts at
http://localhost:3080; if the port is taken, find the occupying process first.
Source: DeepSeek Harness documentation - Quickstart, DeepSeek Harness README, dsh CLI README, pnpm approve-builds, pnpm settings
FAQ
The npx temp cache resolves dependencies incompletely and misses peer deps. Do not keep retrying npx — clear node_modules and the lockfile, then reinstall dependencies locally with pnpm.
@deepseek-ai/dsh is a monorepo whose plugin system references many packages via peer dependencies, which npm's flat install cannot resolve. Switch to pnpm with --shamefully-hoist --config.dedupe-peer-dependents=false and reinstall.
The npm global bin directory is not on PATH. Run npm prefix -g and add that directory to PATH, or skip global install entirely and start with npx dsh web after a local pnpm install.
pnpm ignores dependency build scripts by default, so native modules like node-pty and koffi never compile. Run npx pnpm approve-builds, select all, then npx pnpm install to run the scripts.
No, it is a network timeout warning and pnpm retries automatically until all packages are downloaded. If it keeps failing, switch the npm registry to a mirror and run npx pnpm install again.
Sources
- DeepSeek Harness documentation - Quickstart· deepseek-harness
- DeepSeek Harness README· deepseek-ai
- dsh CLI README· deepseek-ai
- pnpm CLI - approve-builds· pnpm
- pnpm settings - shamefully-hoist· pnpm
- Fixing DeepSeek Harness deploy errors (reference walkthrough)· CSDN