[GH-ISSUE #33] Install @langchain/langgraph-checkpoint and run agent server will cause a js sytax error #15

Closed
opened 2026-02-16 08:17:12 -05:00 by yindo · 1 comment
Owner

Originally created by @wangfupeng1988 on GitHub (Sep 8, 2025).
Original GitHub issue: https://github.com/langchain-ai/create-agent-chat-app/issues/33

hi,

I use npx create-agent-chat-app@latest to create a langgraph app, then run npm run dev, it works fine.

Then I run npm i @langchain/langgraph-checkpoint in apps/agents folder, didn't change code, and then run npm run dev again.

I open browser and seed a message to test, error like this

Image

this is the logs in my node tormial:

 agents npm i @langchain/langgraph-checkpoint

added 1 package in 2s

334 packages are looking for funding
  run `npm fund` for details
➜  agents npm run dev                          

> agents@0.0.1 dev
> npx @langchain/langgraph-cli dev --port 2024 --config ../../langgraph.json --no-browser


          Welcome to

╦  ┌─┐┌┐┌┌─┐╔═╗┬─┐┌─┐┌─┐┬ ┬
║  ├─┤││││ ┬║ ╦├┬┘├─┤├─┘├─┤
╩═╝┴ ┴┘└┘└─┘╚═╝┴└─┴ ┴┴  ┴ ┴.js

- 🚀 API: http://localhost:2024
- 🎨 Studio UI: https://smith.langchain.com/studio?baseUrl=http://localhost:2024

This in-memory server is designed for development and testing.
For production use, please use LangGraph Cloud.


info:    ▪ Starting server...
info:    ▪ Initializing storage...
info:    ▪ Registering graphs from /Users/wfp/Project/zhitalk/practise-demos/basic-agent
info:    ┏ Registering graph with id 'agent'
info:    ┗ [1] { graph_id: 'agent' }
info:    ▪ Starting 10 workers
info:    ▪ Server running at ::1:2024
info:    ▪ <-- POST /threads/search
info:    ▪ --> POST /threads/search 200 6ms
info:    ▪ <-- GET /info
info:    ▪ --> GET /info 200 1ms
info:    ▪ <-- POST /threads
info:    ▪ --> POST /threads 200 1ms
info:    ▪ <-- POST /threads/d5e376b8-3b96-4cae-a577-0a3191c8351d/runs/stream
info:    ┏ Created run
info:    ┗ [1] { run_id: '85e84d12-aee3-4fb7-a3c4-e48c2d72141e', thread_id: 'd5e376b8-3b96-4cae-a577-0a3191c8351d' }
info:    ▪ --> POST /threads/d5e376b8-3b96-4cae-a577-0a3191c8351d/runs/stream 200 11ms
info:    ┏ Starting background run
info:    ┃ [1] {
info:    ┃ [2]   run_id: '85e84d12-aee3-4fb7-a3c4-e48c2d72141e',
info:    ┃ [3]   run_attempt: 1,
info:    ┃ [4]   run_created_at: 2025-09-08T06:33:16.315Z,
info:    ┃ [5]   run_started_at: 2025-09-08T06:33:16.552Z,
info:    ┃ [6]   run_queue_ms: 237
info:    ┗ [7] }
error:   ┏ Background run failed:
TypeError: Cannot read properties of undefined (reading 'length')
    at _prepareNextTasks (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/algo.ts:454:48)
    at PregelLoop._first (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/loop.ts:898:30)
    at async PregelLoop.tick (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/loop.ts:545:7)
    at async CompiledStateGraph._runLoop (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/index.ts:2043:9)
    at async createAndRunLoop (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/index.ts:1942:9)
error:   ┃ [1] {
error:   ┃ [2]   run_id: '85e84d12-aee3-4fb7-a3c4-e48c2d72141e',
error:   ┃ [3]   run_attempt: 1,
error:   ┃ [4]   run_created_at: 2025-09-08T06:33:16.315Z,
error:   ┃ [5]   run_started_at: 2025-09-08T06:33:16.552Z,
error:   ┃ [6]   run_ended_at: 2025-09-08T06:33:16.589Z,
error:   ┃ [7]   run_exec_ms: 37
error:   ┗ [8] }
info:    ▪ <-- POST /threads/search
info:    ▪ --> POST /threads/search 200 2ms

Then I run npm uninstall @langchain/langgraph-checkpoint and npm run dev again, it works fine again.

Installing @langchain/langgraph-checkpoint-mongodb and @langchain/langgraph-checkpoint-postgres also cause the same error.

I stuck here for two days and have not find a way to resolve it, hop your reply and thx very much.

Originally created by @wangfupeng1988 on GitHub (Sep 8, 2025). Original GitHub issue: https://github.com/langchain-ai/create-agent-chat-app/issues/33 hi, I use `npx create-agent-chat-app@latest ` to create a langgraph app, then run `npm run dev`, it works fine. Then I run `npm i @langchain/langgraph-checkpoint` in `apps/agents` folder, didn't change code, and then run `npm run dev` again. I open browser and seed a message to test, error like this <img width="3540" height="816" alt="Image" src="https://github.com/user-attachments/assets/7bd7ec9d-3429-4ca9-8372-d4767985c0ba" /> this is the logs in my node tormial: ``` agents npm i @langchain/langgraph-checkpoint added 1 package in 2s 334 packages are looking for funding run `npm fund` for details ➜ agents npm run dev > agents@0.0.1 dev > npx @langchain/langgraph-cli dev --port 2024 --config ../../langgraph.json --no-browser Welcome to ╦ ┌─┐┌┐┌┌─┐╔═╗┬─┐┌─┐┌─┐┬ ┬ ║ ├─┤││││ ┬║ ╦├┬┘├─┤├─┘├─┤ ╩═╝┴ ┴┘└┘└─┘╚═╝┴└─┴ ┴┴ ┴ ┴.js - 🚀 API: http://localhost:2024 - 🎨 Studio UI: https://smith.langchain.com/studio?baseUrl=http://localhost:2024 This in-memory server is designed for development and testing. For production use, please use LangGraph Cloud. info: ▪ Starting server... info: ▪ Initializing storage... info: ▪ Registering graphs from /Users/wfp/Project/zhitalk/practise-demos/basic-agent info: ┏ Registering graph with id 'agent' info: ┗ [1] { graph_id: 'agent' } info: ▪ Starting 10 workers info: ▪ Server running at ::1:2024 info: ▪ <-- POST /threads/search info: ▪ --> POST /threads/search 200 6ms info: ▪ <-- GET /info info: ▪ --> GET /info 200 1ms info: ▪ <-- POST /threads info: ▪ --> POST /threads 200 1ms info: ▪ <-- POST /threads/d5e376b8-3b96-4cae-a577-0a3191c8351d/runs/stream info: ┏ Created run info: ┗ [1] { run_id: '85e84d12-aee3-4fb7-a3c4-e48c2d72141e', thread_id: 'd5e376b8-3b96-4cae-a577-0a3191c8351d' } info: ▪ --> POST /threads/d5e376b8-3b96-4cae-a577-0a3191c8351d/runs/stream 200 11ms info: ┏ Starting background run info: ┃ [1] { info: ┃ [2] run_id: '85e84d12-aee3-4fb7-a3c4-e48c2d72141e', info: ┃ [3] run_attempt: 1, info: ┃ [4] run_created_at: 2025-09-08T06:33:16.315Z, info: ┃ [5] run_started_at: 2025-09-08T06:33:16.552Z, info: ┃ [6] run_queue_ms: 237 info: ┗ [7] } error: ┏ Background run failed: TypeError: Cannot read properties of undefined (reading 'length') at _prepareNextTasks (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/algo.ts:454:48) at PregelLoop._first (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/loop.ts:898:30) at async PregelLoop.tick (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/loop.ts:545:7) at async CompiledStateGraph._runLoop (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/index.ts:2043:9) at async createAndRunLoop (/Users/wfp/Project/zhitalk/practise-demos/basic-agent/node_modules/@langchain/langgraph/src/pregel/index.ts:1942:9) error: ┃ [1] { error: ┃ [2] run_id: '85e84d12-aee3-4fb7-a3c4-e48c2d72141e', error: ┃ [3] run_attempt: 1, error: ┃ [4] run_created_at: 2025-09-08T06:33:16.315Z, error: ┃ [5] run_started_at: 2025-09-08T06:33:16.552Z, error: ┃ [6] run_ended_at: 2025-09-08T06:33:16.589Z, error: ┃ [7] run_exec_ms: 37 error: ┗ [8] } info: ▪ <-- POST /threads/search info: ▪ --> POST /threads/search 200 2ms ``` Then I run `npm uninstall @langchain/langgraph-checkpoint` and `npm run dev` again, it works fine again. Installing `@langchain/langgraph-checkpoint-mongodb` and `@langchain/langgraph-checkpoint-postgres` also cause the same error. I stuck here for two days and have not find a way to resolve it, hop your reply and thx very much.
yindo closed this issue 2026-02-16 08:17:12 -05:00
Author
Owner

@wangfupeng1988 commented on GitHub (Sep 8, 2025):

I got it.

I search "@langchain/langgraph-checkpoint": "^0.0.17" in the package-lock.json file, the version 0.0.17 is an old version.

So I have to install this version, it works.

@wangfupeng1988 commented on GitHub (Sep 8, 2025): I got it. I search `"@langchain/langgraph-checkpoint": "^0.0.17"` in the package-lock.json file, the version `0.0.17` is an old version. So I have to install this version, it works.
yindo changed title from Install @langchain/langgraph-checkpoint and run agent server will cause a js sytax error to [GH-ISSUE #33] Install @langchain/langgraph-checkpoint and run agent server will cause a js sytax error 2026-06-05 17:18:26 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/create-agent-chat-app#15