@langchain/langgraph-sdk does now work using langgraph studio / platform #137

Closed
opened 2026-02-15 17:16:09 -05:00 by yindo · 5 comments
Owner

Originally created by @ashburnham on GitHub (Nov 24, 2024).

I can't deploy my agent to langgraph platform, or run it locally via langchain studio, as when I try to it says @langchain/langgraph-sdk doesn't exist..

While debugging, it seems that this comes from a file that is part of the langgraph disk image that edits the imports for any package that starts with @langchain/langgraph. I think that code is there to catch @langchain/langgraph/foo/bar imports, but it's messing up @langchain/langgraph-sdk too...

This is an issue as I want to run background memory jobs like thsi

https://github.com/langchain-ai/memory-template-js/blob/main/src/chatbot/graph.ts

but I can't when I include @langchain/langgraph-sdk the build fails with the above error...

Originally created by @ashburnham on GitHub (Nov 24, 2024). I can't deploy my agent to langgraph platform, or run it locally via langchain studio, as when I try to it says @langchain/langgraph-sdk doesn't exist.. While debugging, it seems that this comes from a file that is part of the langgraph disk image that edits the imports for any package that starts with @langchain/langgraph. I think that code is there to catch @langchain/langgraph/foo/bar imports, but it's messing up @langchain/langgraph-sdk too... This is an issue as I want to run background memory jobs like thsi `https://github.com/langchain-ai/memory-template-js/blob/main/src/chatbot/graph.ts` but I can't when I include @langchain/langgraph-sdk the build fails with the above error...
yindo closed this issue 2026-02-15 17:16:09 -05:00
Author
Owner

@jacoblee93 commented on GitHub (Nov 25, 2024):

Apologies for this - having a look!

@jacoblee93 commented on GitHub (Nov 25, 2024): Apologies for this - having a look!
Author
Owner

@andrewnguonly commented on GitHub (Nov 25, 2024):

@ashburnham, is there a stack trace for the error you're seeing? If so, can you share the full stack trace and the exact error message?

@andrewnguonly commented on GitHub (Nov 25, 2024): @ashburnham, is there a stack trace for the error you're seeing? If so, can you share the full stack trace and the exact error message?
Author
Owner

@andrewnguonly commented on GitHub (Nov 25, 2024):

I'm able to reproduce the error by deploying memory-template-js.

Error:

unhandledRejection: Cannot find package '@langchain/langgraph-sdk' imported from /api/langgraph_api/js/src/graph.mts
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@langchain/langgraph-sdk' imported from /api/langgraph_api/js/src/graph.mts
    at packageResolve (node:internal/modules/esm/resolve:854:9)
    at moduleResolve (node:internal/modules/esm/resolve:927:18)
    at defaultResolve (node:internal/modules/esm/resolve:1169:11)
    at nextResolve (node:internal/modules/esm/hooks:868:28)
    at resolveBase (file:///usr/lib/node_modules/tsx/dist/esm/index.mjs?1732567228306:2:3212)
    at resolveDirectory (file:///usr/lib/node_modules/tsx/dist/esm/index.mjs?1732567228306:2:3584)
    at resolveTsPaths (file:///usr/lib/node_modules/tsx/dist/esm/index.mjs?1732567228306:2:4073)
    at resolve (file:///usr/lib/node_modules/tsx/dist/esm/index.mjs?1732567228306:2:4447)
    at nextResolve (node:internal/modules/esm/hooks:868:28)
    at resolve (file:///api/langgraph_api/js/src/hooks.mjs:8:12)
@andrewnguonly commented on GitHub (Nov 25, 2024): I'm able to reproduce the error by deploying [memory-template-js](https://github.com/langchain-ai/memory-template-js). Error: ``` unhandledRejection: Cannot find package '@langchain/langgraph-sdk' imported from /api/langgraph_api/js/src/graph.mts Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@langchain/langgraph-sdk' imported from /api/langgraph_api/js/src/graph.mts at packageResolve (node:internal/modules/esm/resolve:854:9) at moduleResolve (node:internal/modules/esm/resolve:927:18) at defaultResolve (node:internal/modules/esm/resolve:1169:11) at nextResolve (node:internal/modules/esm/hooks:868:28) at resolveBase (file:///usr/lib/node_modules/tsx/dist/esm/index.mjs?1732567228306:2:3212) at resolveDirectory (file:///usr/lib/node_modules/tsx/dist/esm/index.mjs?1732567228306:2:3584) at resolveTsPaths (file:///usr/lib/node_modules/tsx/dist/esm/index.mjs?1732567228306:2:4073) at resolve (file:///usr/lib/node_modules/tsx/dist/esm/index.mjs?1732567228306:2:4447) at nextResolve (node:internal/modules/esm/hooks:868:28) at resolve (file:///api/langgraph_api/js/src/hooks.mjs:8:12) ```
Author
Owner

@ashburnham commented on GitHub (Nov 28, 2024):

This still needs to be causing builds to fail?

https://www.loom.com/share/756ce445677740b7acea8c9b5b3e9b1b

@ashburnham commented on GitHub (Nov 28, 2024): This still needs to be causing builds to fail? https://www.loom.com/share/756ce445677740b7acea8c9b5b3e9b1b
Author
Owner

@jacoblee93 commented on GitHub (Nov 28, 2024):

Do we need to cut a new image @nfcampos?

@jacoblee93 commented on GitHub (Nov 28, 2024): Do we need to cut a new image @nfcampos?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#137