Module '"@langchain/langgraph"' has no exported member 'Annotation' #95

Closed
opened 2026-02-15 17:15:42 -05:00 by yindo · 8 comments
Owner

Originally created by @jiangziyue1219 on GitHub (Sep 26, 2024).

When I copied the code from the langchain.com, I met the followint error

Module '"@langchain/langgraph"' has no exported member 'Annotation'.

How can I solve this problem?
image

Originally created by @jiangziyue1219 on GitHub (Sep 26, 2024). When I copied the code from the langchain.com, I met the followint error Module '"@langchain/langgraph"' has no exported member 'Annotation'. How can I solve this problem? <img width="605" alt="image" src="https://github.com/user-attachments/assets/0f8da846-3d02-4e2b-8282-0f24687d71c5">
yindo closed this issue 2026-02-15 17:15:42 -05:00
Author
Owner

@jacoblee93 commented on GitHub (Sep 26, 2024):

What version of @langchain/langgraph do you have installed?

@jacoblee93 commented on GitHub (Sep 26, 2024): What version of `@langchain/langgraph` do you have installed?
Author
Owner

@jiangziyue1219 commented on GitHub (Sep 27, 2024):

What version of @langchain/langgraph do you have installed?

0.0.31

And it seems that it is still ok if I don't import 'Annotation' and don't use Annotation.Root() to define a state. So can I give up using it ?

@jiangziyue1219 commented on GitHub (Sep 27, 2024): > What version of `@langchain/langgraph` do you have installed? 0.0.31 And it seems that it is still ok if I don't import 'Annotation' and don't use Annotation.Root() to define a state. So can I give up using it ?
Author
Owner

@jacoblee93 commented on GitHub (Sep 27, 2024):

Can you update to latest (0.2.9)?

@jacoblee93 commented on GitHub (Sep 27, 2024): Can you update to latest (0.2.9)?
Author
Owner

@jiangziyue1219 commented on GitHub (Sep 28, 2024):

Can you update to latest (0.2.9)?

ok, the problem has been solved when I update the package to 0.2.9. thanks!

@jiangziyue1219 commented on GitHub (Sep 28, 2024): > Can you update to latest (0.2.9)? ok, the problem has been solved when I update the package to 0.2.9. thanks!
Author
Owner

@jiangziyue1219 commented on GitHub (Sep 28, 2024):

And what should I do and how to write if I want to limit the type of a defined state using interface?

@jiangziyue1219 commented on GitHub (Sep 28, 2024): And what should I do and how to write if I want to limit the type of a defined state using interface?
Author
Owner

@jacoblee93 commented on GitHub (Sep 29, 2024):

Maybe this is helpful?

https://langchain-ai.github.io/langgraphjs/how-tos/define-state/

@jacoblee93 commented on GitHub (Sep 29, 2024): Maybe this is helpful? https://langchain-ai.github.io/langgraphjs/how-tos/define-state/
Author
Owner

@jiangziyue1219 commented on GitHub (Sep 30, 2024):

thanks, but it isn't helpful

@jiangziyue1219 commented on GitHub (Sep 30, 2024): thanks, but it isn't helpful
Author
Owner

@jacoblee93 commented on GitHub (Sep 30, 2024):

Can you share code shortly exactly what you're trying to do?

@jacoblee93 commented on GitHub (Sep 30, 2024): Can you share code shortly exactly what you're trying to do?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#95