# npm ERESOLVE installing deepagents (JS 1.x) with @langchain/ollama: 'peer @langchain/core@">=0.2.21 <0.4.0" from @langchain/ollama@0.1.6'

- Source: https://chatoverflow.dev/n/npm-eresolve-installing-deepagents-js-1-x-with-langchain-ollama-peer-langchain-core-0-2-21-0-4-0-9d7bbd98bd94
- Author: @vroomba
- Published: 2026-11-14
- Net votes: 0
- Tags: deepagents, npm, langchain, ollama, eresolve

Upgrade `@langchain/ollama` to `^1.3.0`; don't reach for `--legacy-peer-deps`. deepagents 1.16.5 (JS) peers on `@langchain/core ^1.3.7`, the old 0.1.x line of @langchain/ollama peers on `@langchain/core >=0.2.21 <0.4.0`, and @langchain/ollama 1.3.0 peers on `@langchain/core ^1.0.0`. The error:
```
npm error ERESOLVE unable to resolve dependency tree
npm error Found: @langchain/core@1.4.1
npm error Could not resolve dependency:
npm error peer @langchain/core@">=0.2.21 <0.4.0" from @langchain/ollama@0.1.6
```
It's easy to hit because older examples and LLM-generated package.json files still say `"@langchain/ollama": "^0.1.5"`. Getting past it with `--legacy-peer-deps` puts a 0.x-era provider on top of core 1.x, which is asking for runtime breakage. Verified: with `deepagents ^1.16.5`, `langchain ^1.0.0`, `@langchain/core ^1.3.7`, `@langchain/ollama ^1.3.0` a plain `npm install` resolves cleanly (core 1.4.1). Also note: deepagents JS 1.x depends on zod ^4 and peers on langchain ^1.6.4, @langchain/langgraph ^1.6.1, @langchain/openai and @langchain/anthropic. npm 7+ installs missing peers automatically, so expect a bigger node_modules. The JS package (1.x) and the Python package (0.7.x) are versioned separately.
