DeepSeekDSH
Independent community guideNot affiliated with DeepSeek.Download versions and guide references

DSH pnpm Error: Cannot Find Package 'zod'

Diagnose the missing zod dependency in DeepSeek Harness rc.2 and rc.3. Add it with pnpm packageExtensions and verify the typert import.

On this page

First, match Cannot find package 'zod'

This page targets Cannot find package 'zod'. The full message can contain a few extra words on different operating systems or Node.js versions, but the core error code or phrase should match.

Cannot find package 'zod'
ERR_MODULE_NOT_FOUND
dsh-web/lib/typert.host.js
zod

When searching or asking for help, copy the full error and remove API keys, private repository names, usernames and sensitive paths.

Fast fix: Cannot find package 'zod'

If the import path ends in @deepseek-ai/dsh-web/lib/typert.host.js, add zod to that package with packageExtensions in a pnpm workspace. Match the exact installed version, run pnpm install and repeat the import check.

What Cannot find package 'zod' means

The message comes from Node's module loader while DSH starts the web contributor. The published typert.host.js imports zod to build the schema for the web provider list. When that import fails, the contributor cannot load. In the rc.2 report, the browser still opened, but the ctx.web capability for search and fetch was unavailable. The terminal message and the provider list are therefore more useful than checking only whether the page opens.

Common causes of Cannot find package 'zod'

  • The rc.2 and rc.3 tarballs both import zod. Their package manifests omit it from dependencies and peerDependencies. The matching dsh-typert-protocol package declares zod 4.6.6, which supplies the version used in the check below.
  • With an isolated dependency layout, Node resolves the import from the package that contains typert.host.js. A copy of zod elsewhere in the installation is useful only when Node can reach it from that file. A hoisted installation can supply that copy and hide the missing declaration.
  • The observed rc.2 case used Windows 11, Node 24.22.1 and pnpm 12.16.1. The package-level rc.3 check below used macOS, Node 25.6.1 and pnpm 10.31.0 with hoisting disabled. The check ran only the typert import.

Source trace for Cannot find package 'zod'

Fix Cannot find package 'zod'

  1. 01

    Identify the installation that prints the warning

    Record the command that launched DSH and the path after imported from. A global pnpm install, a workspace-local command and an npx launch can use different copies of the same package. Check the CLI version and locate the package named in the warning before editing any pnpm configuration. Both CLI releases declare Node.js 24.9.0 or later.

    node --version pnpm --version pnpm list -g @deepseek-ai/dsh --depth=0
  2. 02

    Check the package named in the error

    Ask the registry for the exact version of @deepseek-ai/dsh-web from the import path. The command below prints its declared dependencies and peers. Use 0.2.2-rc.2 if that is the version in the warning. The npm next tag can move during troubleshooting, so keep the exact package version with your output.

    npm view @deepseek-ai/dsh-web@0.2.2-rc.3 dependencies peerDependencies --json
  3. 03

    Prepare a separate package check

    Create an empty directory and run pnpm init there. Save the settings below as pnpm-workspace.yaml. The isolated layout and disabled hoisting make the package's dependency declaration observable. This directory is for inspecting one module. It does not need a DSH profile, model credential or project workspace.

    nodeLinker: isolated hoist: false
  4. 04

    Install the package and save a probe

    In that directory, run pnpm add --save-exact --ignore-scripts @deepseek-ai/dsh-web@0.2.2-rc.3. Save the two lines below in probe.mjs, then run node probe.mjs. In the checked layout, Node reports ERR_MODULE_NOT_FOUND and names zod as the missing package. Keep the output so you can compare the same import after the change.

    const { TYPERT } = await import("@deepseek-ai/dsh-web/typert"); console.log(TYPERT.package);
  5. 05

    Declare zod for the package that imports it

    Append the YAML below to the test directory's pnpm-workspace.yaml. In a project that already uses packageExtensions, add the package entry under the existing key. For an rc.2 project, change the selector to 0.2.2-rc.2. Then run pnpm install. The extension applies to the selected release so it can be removed when the published package supplies its own dependency.

    packageExtensions: '@deepseek-ai/dsh-web@0.2.2-rc.3': dependencies: zod: 4.6.6
  6. 06

    Repeat the import before testing the application

    Run node probe.mjs again. The output should be @deepseek-ai/dsh-web, which confirms that the typert module loaded. For a DSH installation managed in a pnpm workspace, apply the same entry at its workspace root and start that workspace's copy with pnpm exec dsh web. A workspace file applies to installs in that workspace. An existing pnpm add -g installation has its own dependency tree.

    node probe.mjs
  7. 07

    Check the search and fetch path

    Use the URL printed by the new DSH process. Review its startup output for the missing zod warning. Then open the web tool settings and check the provider list. If you have already configured a provider, run one small search or fetch. A provider authentication error at this stage is a separate result from the original module import failure.

  8. 08

    Remove the workspace extension when it is no longer needed

    Check the manifest for the exact replacement version. When that release declares zod, remove the entry for the old package version and run pnpm install again. For a workspace under version control, review the workspace file and lockfile together. Repeat the module import and the web provider check for the version you intend to keep.

Verify Cannot find package 'zod' is fixed

  • The isolated rc.3 package import failed before the extension and loaded TYPERT after it.
  • For a full DSH installation, startup no longer reports the missing package from typert.host.js and the web provider list loads.

Cannot find package 'zod' FAQ

How do I fix Cannot find package 'zod'?

If the import path ends in @deepseek-ai/dsh-web/lib/typert.host.js, add zod to that package with packageExtensions in a pnpm workspace. Match the exact installed version, run pnpm install and repeat the import check.

What does Cannot find package 'zod' mean?

The message comes from Node's module loader while DSH starts the web contributor. The published typert.host.js imports zod to build the schema for the web provider list. When that import fails, the contributor cannot load. In the rc.2 report, the browser still opened, but the ctx.web capability for search and fetch was unavailable. The terminal message and the provider list are therefore more useful than checking only whether the page opens.

How do I verify Cannot find package 'zod' is fixed?

The isolated rc.3 package import failed before the extension and loaded TYPERT after it. For a full DSH installation, startup no longer reports the missing package from typert.host.js and the web provider list loads.

Sources and version

Updated · View sources