Support Zod v4 #365

Open
opened 2026-02-15 18:16:14 -05:00 by yindo · 0 comments
Owner

Originally created by @kdawgwilk on GitHub (Sep 25, 2025).

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangGraph.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangGraph.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package).

Example Code

See the docs for how to support both zod v3/v4 https://zod.dev/library-authors

Error Message and Stack Trace (if applicable)

npm error Could not resolve dependency:
npm error @langchain/langgraph@"*" from functions@1.0.0
npm error functions
npm error   functions@1.0.0
npm error   node_modules/functions
npm error     workspace functions from the root project
npm error
npm error Conflicting peer dependency: zod@4.1.11
npm error node_modules/zod
npm error   peer zod@"^3.24.1" from zod-to-json-schema@3.24.6
npm error   node_modules/zod-to-json-schema
npm error     peerOptional zod-to-json-schema@"^3.x" from @langchain/langgraph@0.4.9
npm error     node_modules/@langchain/langgraph
npm error       @langchain/langgraph@"*" from functions@1.0.0
npm error       functions
npm error         functions@1.0.0
npm error         node_modules/functions
npm error     zod-to-json-schema@"^3.22.3" from @langchain/core@0.3.77
npm error     node_modules/@langchain/core
npm error       @langchain/core@"^0.3.75" from functions@1.0.0
npm error       functions
npm error         functions@1.0.0
npm error         node_modules/functions
npm error       1 more (@langchain/langgraph)
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

Description

I'm trying to install langgraph into my existing project that has deps on zod v4

System Info

Node version: v22.14.0
Operating system: darwin arm64
Package manager: npm
Package manager version: 10.8.2

Originally created by @kdawgwilk on GitHub (Sep 25, 2025). ### Checked other resources - [x] I added a very descriptive title to this issue. - [x] I searched the LangGraph.js documentation with the integrated search. - [x] I used the GitHub search to find a similar question and didn't find it. - [x] I am sure that this is a bug in LangGraph.js rather than my code. - [x] The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package). ### Example Code See the docs for how to support both zod v3/v4 https://zod.dev/library-authors ### Error Message and Stack Trace (if applicable) ``` npm error Could not resolve dependency: npm error @langchain/langgraph@"*" from functions@1.0.0 npm error functions npm error functions@1.0.0 npm error node_modules/functions npm error workspace functions from the root project npm error npm error Conflicting peer dependency: zod@4.1.11 npm error node_modules/zod npm error peer zod@"^3.24.1" from zod-to-json-schema@3.24.6 npm error node_modules/zod-to-json-schema npm error peerOptional zod-to-json-schema@"^3.x" from @langchain/langgraph@0.4.9 npm error node_modules/@langchain/langgraph npm error @langchain/langgraph@"*" from functions@1.0.0 npm error functions npm error functions@1.0.0 npm error node_modules/functions npm error zod-to-json-schema@"^3.22.3" from @langchain/core@0.3.77 npm error node_modules/@langchain/core npm error @langchain/core@"^0.3.75" from functions@1.0.0 npm error functions npm error functions@1.0.0 npm error node_modules/functions npm error 1 more (@langchain/langgraph) npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. ``` ### Description I'm trying to install langgraph into my existing project that has deps on zod v4 ### System Info Node version: v22.14.0 Operating system: darwin arm64 Package manager: npm Package manager version: 10.8.2
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#365