Skip to content

pnpm global install crashes: zod-to-json-schema requires zod/v3 subpath #127

@ClarkStElevista

Description

@ClarkStElevista

Summary

pnpm add -g firecrawl-cli@1.19.0 produces a binary that crashes on every invocation. npm install -g works because npm's flat hoisting accidentally satisfies the dep.

Repro

pnpm add -g firecrawl-cli@latest
firecrawl --version

Error

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './v3' is not defined
by "exports" in .../zod-to-json-schema@3.25.2_zod@3.24.4/node_modules/zod/package.json
    at packageExportsResolve (node:internal/modules/esm/resolve:660:9)

Root cause

zod-to-json-schema@3.25.2 (transitive dep) calls require('zod/v3'). The ./v3 subpath only exists in zod@3.25+, but firecrawl-cli's range resolves zod@3.24.4 under pnpm's strict hoisting.

Suggested fix

Pin zod >= 3.25.0 in package.json, or override zod-to-json-schema resolution, or stop importing the zod/v3 compat subpath.

Env

  • firecrawl-cli 1.19.0
  • pnpm 10.30.2
  • Node 22.21.0
  • macOS (darwin arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions