LangChain 1.0 cut langchain down to the agent building blocks and published the rest as @langchain/classic. Imports of chains, legacy agents, retrievers, memory, document loaders, output parsers or stores from a langchain/... subpath stop resolving on upgrade. The code behind them did not change; the package name in front of the subpath did.
What changed
- 85 subpaths moved to
@langchain/classic, same names.langchain/agents,langchain/chains,langchain/retrievers/*,langchain/memory,langchain/document_loaders/*,langchain/output_parsers,langchain/text_splitter,langchain/tools/*,langchain/stores/*,langchain/vectorstores/memory,langchain/evaluation,langchain/smith, theexperimentaltree and theutilhelpers. The map was derived by comparing the exports oflangchain0.3.36 with 1.0.1 and keeping every subpath@langchain/classic1.0.0 publishes. - Ten subpaths stayed.
langchain,langchain/hubandlangchain/chat_models/universalare unaffected. - One subpath was removed.
langchain/runnables/remoteand itsRemoteRunnablehave no replacement in the v1 packages.
Before and after
A v0 program built from parts that moved:
import { createRetrievalChain } from 'langchain/chains/retrieval';import { EnsembleRetriever } from 'langchain/retrievers/ensemble';import { RecursiveCharacterTextSplitter } from 'langchain/text_splitter';import { StructuredOutputParser } from 'langchain/output_parsers';After npx emendant fix, only the package in front of each subpath changes:
import { createRetrievalChain } from '@langchain/classic/chains/retrieval';import { EnsembleRetriever } from '@langchain/classic/retrievers/ensemble';import { RecursiveCharacterTextSplitter } from '@langchain/classic/text_splitter';import { StructuredOutputParser } from '@langchain/classic/output_parsers';There is no after for RemoteRunnable.
Migration guidance and its limits
Apply the patch, then install @langchain/classic. The patch rewrites specifiers and does not touch your manifest, so until the package is installed the verification run reports it as failing. Add the dependency and run the fix again.
A langchain/... subpath the map does not name went somewhere other than @langchain/classic, or was never public, and Emendant reports nothing for it rather than guessing. langchain/runnables/remote is report only. The new agent API in langchain 1.0 is outside this page: a clean scan says your imports still resolve, not that your agents behave as before.
A major upgrade moves @langchain/core to 1.0 as well. Read @langchain/core 1.0.0: predict and predictMessages removed with this page. A repository still on 0.2 has the 0.3 move of 39 entrypoints to @langchain/community to make first. The LangChain.js migration guide lists the later 1.x release pages.
What Emendant detects, fixes and verifies
2 changes in langchain 1.0.1. 1 automatic fixes, 0 fixes requiring a model provider you choose, 1 report only. Each patch states which checks passed. Understand patch evidence.
| Change | Severity | Detects | Fix | Verified by |
|---|---|---|---|---|
The legacy langchain modules moved to @langchain/classiclangchain-npm-1.0.1-legacy-modules-moved-to-classic | Breaking |
| Patch, written by the replace-module-path transform | Your typecheck and tests |
RemoteRunnable was removedlangchain-npm-1.0.1-remoterunnable-removed | Breaking |
| Report only | Not applicable |
emendant explain <change-id> prints any row's entry, guidance and sources at the terminal.
Coverage
Requires emendant@0.1.0 or later. Run emendant feed update to get the latest coverage.
Coverage details
- Snapshot
2026-08-28.1, sequence 11, signed 28 August 2026- Feed entry
feed/npm/langchain/1.0.1.json
emendant feed status shows the snapshot your machine holds.
Primary sources
Scan your repository
Find affected code without editing your files.
npx emendant scanThen npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.
Related release pages
- Earlier langchain release: LangChain 0.3 for JavaScript: 39 entrypoints move to @langchain/community, six are gone
- Later langchain release: langchain 1.0.3 for JavaScript: getContextVariable and setContextVariable removed
- Upgrade together with: @langchain/core 1.0.0: predict and predictMessages removed, and what else went
The LangChain.js migration guide lists every release page and says which to read for your upgrade.