Broken export in "@langchain/langgraph" #108

Closed
opened 2026-02-15 17:15:53 -05:00 by yindo · 3 comments
Owner

Originally created by @vicent4no on GitHub (Oct 9, 2024).

Description

When importing something from "@langchain/langgraph" the code does not run. The following error is printed

SyntaxError: The requested module '@langchain/langgraph-checkpoint' does not provide an export named 'InMemoryStore'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:171:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:254:5)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)

This happens since versions

  • "@langchain/core": "0.3.8"
  • "@langchain/langgraph": "0.2.12"

Code sample

import { END } from "@langchain/langgraph";

function main() {
    console.log(END);
}

main()

NodeJS v22.6.0

Temporary solution

Backport to 0.2.11

Originally created by @vicent4no on GitHub (Oct 9, 2024). # Description When importing something from "@langchain/langgraph" the code does not run. The following error is printed ``` SyntaxError: The requested module '@langchain/langgraph-checkpoint' does not provide an export named 'InMemoryStore' at ModuleJob._instantiate (node:internal/modules/esm/module_job:171:21) at async ModuleJob.run (node:internal/modules/esm/module_job:254:5) at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:26) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) ``` This happens since versions * "@langchain/core": "0.3.8" * "@langchain/langgraph": "0.2.12" # Code sample ``` import { END } from "@langchain/langgraph"; function main() { console.log(END); } main() ``` NodeJS v22.6.0 # Temporary solution Backport to 0.2.11
yindo closed this issue 2026-02-15 17:15:53 -05:00
Author
Owner

@spencermize commented on GitHub (Oct 9, 2024):

Can confirm I have the same bug.

  ▲ Next.js 14.2.5
  - Experiments (use with caution):
    · typedRoutes
    · instrumentationHook

   Creating an optimized production build ...
Failed to compile.

../node_modules/@langchain/langgraph/dist/web.js
export 'InMemoryStore' (reexported as 'InMemoryStore') was not found in '@langchain/langgraph-checkpoint' (possible exports: AsyncBatchedStore, BaseCheckpointSaver, BaseStore, MemorySaver, MemoryStore, TASKS, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, maxChannelVersion, uuid5, uuid6)

Import trace for requested module:
../node_modules/@langchain/langgraph/dist/web.js
../node_modules/@langchain/langgraph/dist/index.js
../node_modules/@langchain/langgraph/index.js
./src/server-actions/chat.ts
./src/app/(authenticated)/google-addon/sidebar/[docId]/[orgSlug]/projects/[projectId]/chat/[chatHistoryId]/page.tsx


> Build failed because of webpack errors
@spencermize commented on GitHub (Oct 9, 2024): Can confirm I have the same bug. ``` ▲ Next.js 14.2.5 - Experiments (use with caution): · typedRoutes · instrumentationHook Creating an optimized production build ... Failed to compile. ../node_modules/@langchain/langgraph/dist/web.js export 'InMemoryStore' (reexported as 'InMemoryStore') was not found in '@langchain/langgraph-checkpoint' (possible exports: AsyncBatchedStore, BaseCheckpointSaver, BaseStore, MemorySaver, MemoryStore, TASKS, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, maxChannelVersion, uuid5, uuid6) Import trace for requested module: ../node_modules/@langchain/langgraph/dist/web.js ../node_modules/@langchain/langgraph/dist/index.js ../node_modules/@langchain/langgraph/index.js ./src/server-actions/chat.ts ./src/app/(authenticated)/google-addon/sidebar/[docId]/[orgSlug]/projects/[projectId]/chat/[chatHistoryId]/page.tsx > Build failed because of webpack errors ```
Author
Owner

@jacoblee93 commented on GitHub (Oct 9, 2024):

Can you reinstall from scratch? We renamed this but seems that we didn't narrow the dep properly. Will push a fix in the next version.

CC @hinthornw

@jacoblee93 commented on GitHub (Oct 9, 2024): Can you reinstall from scratch? We renamed this but seems that we didn't narrow the dep properly. Will push a fix in the next version. CC @hinthornw
Author
Owner

@vicent4no commented on GitHub (Oct 10, 2024):

Amazing, thank you a lot. I couldn't provide you feedback yesterday given the fact I was not on the computer. However, it seems like you have already released a new version.

So thanks! Have an amazing rest of the week & weekend.

@vicent4no commented on GitHub (Oct 10, 2024): Amazing, thank you a lot. I couldn't provide you feedback yesterday given the fact I was not on the computer. However, it seems like you have already released a new version. So thanks! Have an amazing rest of the week & weekend.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#108